Comparing version 0.3.15 to 0.3.16
{ | ||
"name": "mlly", | ||
"version": "0.3.15", | ||
"version": "0.3.16", | ||
"description": "Missing ECMAScript module utils for Node.js", | ||
@@ -5,0 +5,0 @@ "repository": "unjs/mlly", |
@@ -60,3 +60,3 @@ # mlly | ||
- `from`: URL or string (default is `pwd()`) | ||
- `url`: URL or string to resolve from (default is `pwd()`) | ||
- `conditions`: Array of conditions used for resolution algorithm (default is `['node', 'import']`) | ||
@@ -385,3 +385,3 @@ - `extensions`: Array of additional extensions to check if import failed (default is `['.mjs', '.cjs', '.js', '.json']`) | ||
Generate an static import statement. | ||
Generate a static import statement. | ||
@@ -391,9 +391,9 @@ ```js | ||
// import { foo } from 'pkg' | ||
// import { foo } from "pkg" | ||
console.log(genImport('pkg', 'foo')) | ||
// import { a, b } from 'pkg' | ||
// import { a, b } from "pkg" | ||
console.log(genImport('pkg', 'foo')) | ||
// import { foo as bar } from 'pkg' | ||
// import { foo as bar } from "pkg" | ||
console.log(genImport('pkg', { name: 'foo', as: 'bar' })) | ||
@@ -404,3 +404,3 @@ ``` | ||
Generate an dynamic import statement. | ||
Generate a dynamic import statement. | ||
@@ -410,12 +410,12 @@ ```js | ||
// () => import('pkg') | ||
// () => import("pkg") | ||
console.log(genDynamicImport('pkg')) | ||
// () => import('pkg').then(m => m.default || m) | ||
// () => import("pkg").then(m => m.default || m) | ||
console.log(genDynamicImport('pkg', { interopDefault: true })) | ||
// import('pkg') | ||
// import("pkg") | ||
console.log(genDynamicImport('pkg', { wrapper: false })) | ||
// () => import('pkg' /* webpackChunkName: "pkg" */) | ||
// () => import("pkg" /* webpackChunkName: "pkg" */) | ||
console.log(genDynamicImport('pkg', { comment: 'webpackChunkName: "pkg"' })) | ||
@@ -422,0 +422,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
522241