Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-universal-import

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-universal-import - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

13

index.js

@@ -5,2 +5,4 @@ 'use-strict'

const path = require('path')
const visited = Symbol('visited')

@@ -113,3 +115,5 @@

t.identifier('file'),
t.stringLiteral(p.hub.file.opts.filename)
t.stringLiteral(
path.relative(__dirname, p.hub.file.opts.filename || '') || ''
)
)

@@ -210,6 +214,6 @@ }

const opts = this.opts.babelServer
const opts = (this.opts.babelServer
? [
idOption(t, importArgNode),
fileOption(t, p),
this.opts.includeFileName ? fileOption(t, p) : undefined,
pathOption(t, pathTemplate, p, importArgNode),

@@ -221,3 +225,3 @@ resolveOption(t, resolveTemplate, importArgNode),

idOption(t, importArgNode),
fileOption(t, p),
this.opts.includeFileName ? fileOption(t, p) : undefined,
loadOption(t, loadTemplate, p, importArgNode), // only when not on a babel-server

@@ -228,2 +232,3 @@ pathOption(t, pathTemplate, p, importArgNode),

]
).filter(Boolean)

@@ -230,0 +235,0 @@ const options = t.objectExpression(opts)

{
"name": "babel-plugin-universal-import",
"version": "3.0.2",
"version": "3.0.3",
"description": "Babel plugin to transform import() into its Universal counterpart",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -149,2 +149,16 @@ <a href="https://gitter.im/Reactlandia/Lobby" target="_blank">

## Include additional debugging info
To prevent leaking of information, file names are not included in the final output. However, for debugging purposes, you may set the `includeFileName` flag option to true. This will include the path to the source file from which the import() is happening to be exposed.
```js
{
"plugins": [
["universal-import", {
"includeFileName": true
}]
]
}
```
## Next Steps

@@ -151,0 +165,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc