requirejs-esm 3.1.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/api.js +9401 -269
- package/dist/api.js.map +1 -1
- package/dist/plugin.js +9398 -262
- package/dist/plugin.js.map +1 -1
- package/package.json +12 -13
- package/src/api.d.ts +12 -4
- package/src/plugin.js +4 -0
- package/src/transform.js +6 -1
- package/src/transformer/esm.js +13 -3
package/README.md
CHANGED
|
@@ -123,6 +123,9 @@ The `esm` plugin supports configuration with the following defaults:
|
|
|
123
123
|
mixedAmdAndEsm: false,
|
|
124
124
|
// Suppress transpiling even if an optimized module has not been loaded yet.
|
|
125
125
|
onlyAmd: false,
|
|
126
|
+
// Do not insert `"use strict"` expression to the AMD modules. You'd set it
|
|
127
|
+
// to `false` if your bundler inserts `"use strict"` to the outer scope.
|
|
128
|
+
useStrict: true,
|
|
126
129
|
// Enable source maps, can be an object with booleans { inline, content }.
|
|
127
130
|
// If set to true, the object will be set to { inline: true, content: true }.
|
|
128
131
|
sourceMap: false,
|
|
@@ -151,6 +154,9 @@ The `transform` method supports a subset of plugin options:
|
|
|
151
154
|
resolvePath: func,
|
|
152
155
|
// Allow using a different plugin alias than `esm` in the source code.
|
|
153
156
|
pluginName: 'esm',
|
|
157
|
+
// Do not insert `"use strict"` expression to the AMD code output. You'd set
|
|
158
|
+
// it to `false` if your bundler inserts `"use strict"` to the outer scope.
|
|
159
|
+
useStrict: true,
|
|
154
160
|
// Enable source maps, can be an object with booleans { inline, content }.
|
|
155
161
|
// If set to true, the object will be set to { inline: true, content: true }.
|
|
156
162
|
sourceMap: false
|