@jsenv/plugin-bundling 2.0.0 → 2.1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/plugin-bundling",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@jsenv/sourcemap": "1.0.9",
|
|
32
32
|
"acorn-import-assertions": "1.8.0",
|
|
33
33
|
"lightningcss": "1.19.0",
|
|
34
|
-
"rollup": "3.
|
|
34
|
+
"rollup": "3.20.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@jsenv/core": "*"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* TODO:
|
|
3
|
+
* js classic might contain importScripts or self.importScripts calls
|
|
4
|
+
* (when it's inside worker, service worker, etc...)
|
|
5
|
+
* ideally we should bundle it when urlInfo.subtype === "worker"
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// import { createMagicSource } from "@jsenv/utils/sourcemap/magic_source.js"
|
|
9
|
+
|
|
10
|
+
export const bundleJsClassic = () => {
|
|
11
|
+
return {}
|
|
12
|
+
}
|
|
@@ -93,7 +93,11 @@ export const bundleJsModules = async ({
|
|
|
93
93
|
},
|
|
94
94
|
rollupOutput: {
|
|
95
95
|
compact: context.minification,
|
|
96
|
-
|
|
96
|
+
// cannot be enabled otherwise:
|
|
97
|
+
// - rollup rename InlineContent export into one letter export like "n"
|
|
98
|
+
// - inline content detection cannot detect new InlineContent() calls
|
|
99
|
+
// -> inline content is not detected, among other things url are not versioned
|
|
100
|
+
minifyInternalExports: false, // context.minification,
|
|
97
101
|
generatedCode: {
|
|
98
102
|
arrowFunctions: context.isSupportedOnCurrentClients("arrow_function"),
|
|
99
103
|
constBindings: context.isSupportedOnCurrentClients("const_bindings"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bundleCss } from "./css/css_bundling_lightning_css.js"
|
|
2
|
-
import {
|
|
2
|
+
import { bundleJsClassic } from "./js_classic/bundle_js_classic.js"
|
|
3
3
|
import { bundleJsModules } from "./js_module/bundle_js_modules.js"
|
|
4
4
|
|
|
5
5
|
export const jsenvPluginBundling = ({
|
|
@@ -19,7 +19,7 @@ export const jsenvPluginBundling = ({
|
|
|
19
19
|
}
|
|
20
20
|
if (js_classic) {
|
|
21
21
|
bundle.js_classic = (jsClassicUrlInfos, context) => {
|
|
22
|
-
return
|
|
22
|
+
return bundleJsClassic({
|
|
23
23
|
jsClassicUrlInfos,
|
|
24
24
|
context,
|
|
25
25
|
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* TODO:
|
|
3
|
-
* for each js_classic where subtype is a worker
|
|
4
|
-
* take the url info and find importScripts calls
|
|
5
|
-
* and replace them with the corresponding url info file content
|
|
6
|
-
* we'll ikely need to save the importScripts node location to be able to do that
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
// import { createMagicSource } from "@jsenv/utils/sourcemap/magic_source.js"
|
|
10
|
-
|
|
11
|
-
export const bundleJsClassicWorkers = () => {
|
|
12
|
-
return {}
|
|
13
|
-
}
|