@nebula.js/cli-build 5.0.0-alpha.2 → 5.0.0-alpha.3
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 +19 -12
- package/lib/config.js +2 -1
- package/lib/init-config.js +6 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -16,18 +16,25 @@ nebula build
|
|
|
16
16
|
Build nebula.js visualization
|
|
17
17
|
|
|
18
18
|
Options:
|
|
19
|
-
--version
|
|
20
|
-
--config, -c
|
|
21
|
-
|
|
22
|
-
--watch, -w
|
|
23
|
-
|
|
24
|
-
--sourcemap, -m
|
|
25
|
-
--mode
|
|
26
|
-
|
|
27
|
-
--core
|
|
28
|
-
--typescript
|
|
29
|
-
--preferBuiltins
|
|
30
|
-
|
|
19
|
+
--version Show version number [boolean]
|
|
20
|
+
--config, -c Path to a JavaScript config file
|
|
21
|
+
[string] [default: "nebula.config.js"]
|
|
22
|
+
--watch, -w Watch source files
|
|
23
|
+
[choices: "umd", "systemjs"] [default: "umd"]
|
|
24
|
+
--sourcemap, -m Generate source map [boolean] [default: true]
|
|
25
|
+
--mode Explicitly set mode
|
|
26
|
+
[string] [choices: "production", "development"]
|
|
27
|
+
--core Set a core build target [string] [default: "core"]
|
|
28
|
+
--typescript Enable typescript bundling [boolean] [default: false]
|
|
29
|
+
--preferBuiltins Specify whether to use Node.js built-in modules.
|
|
30
|
+
[boolean] [default: true]
|
|
31
|
+
--browser Use the browser module resolutions in package.json and adds
|
|
32
|
+
'browser' to exportConditions if it is not present so browser
|
|
33
|
+
conditionals in exports are applied.
|
|
34
|
+
[boolean] [default: false]
|
|
35
|
+
--inlineDynamicImports Inlines dynamic imports, allowing for code-splitting
|
|
36
|
+
regardless of format.
|
|
37
|
+
[boolean] [default: false]
|
|
31
38
|
```
|
|
32
39
|
|
|
33
40
|
## Example
|
package/lib/config.js
CHANGED
|
@@ -61,7 +61,7 @@ const config = ({
|
|
|
61
61
|
mode = 'production',
|
|
62
62
|
format = 'umd',
|
|
63
63
|
cwd = process.cwd(),
|
|
64
|
-
argv = { sourcemap: true },
|
|
64
|
+
argv = { sourcemap: true, inlineDynamicImports: false },
|
|
65
65
|
core,
|
|
66
66
|
behaviours: {
|
|
67
67
|
getExternal = getExternalDefault,
|
|
@@ -175,6 +175,7 @@ const config = ({
|
|
|
175
175
|
output: {
|
|
176
176
|
banner,
|
|
177
177
|
format,
|
|
178
|
+
inlineDynamicImports: argv.inlineDynamicImports,
|
|
178
179
|
file: path.resolve(dir, outputFile),
|
|
179
180
|
name: outputName,
|
|
180
181
|
sourcemap,
|
package/lib/init-config.js
CHANGED
|
@@ -54,6 +54,12 @@ const options = {
|
|
|
54
54
|
type: 'boolean',
|
|
55
55
|
default: false,
|
|
56
56
|
},
|
|
57
|
+
inlineDynamicImports: {
|
|
58
|
+
description:
|
|
59
|
+
'In Rollup, inlineDynamicImports option is a configuration option that allows code-splitting while still creating a single bundle.',
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
57
63
|
};
|
|
58
64
|
|
|
59
65
|
// nebula build --watch - watch umd bundle
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebula.js/cli-build",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "QlikTech International AB",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"lint": "eslint src"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/cli": "7.23.
|
|
25
|
-
"@babel/core": "7.23.
|
|
24
|
+
"@babel/cli": "7.23.9",
|
|
25
|
+
"@babel/core": "7.23.9",
|
|
26
26
|
"@babel/plugin-transform-react-jsx": "7.23.4",
|
|
27
|
-
"@babel/preset-env": "7.23.
|
|
27
|
+
"@babel/preset-env": "7.23.9",
|
|
28
28
|
"@rollup/plugin-babel": "6.0.4",
|
|
29
29
|
"@rollup/plugin-commonjs": "25.0.7",
|
|
30
30
|
"@rollup/plugin-json": "6.1.0",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"@rollup/plugin-terser": "0.4.4",
|
|
34
34
|
"chalk": "4.1.2",
|
|
35
35
|
"extend": "3.0.2",
|
|
36
|
-
"postcss": "^8.4.
|
|
37
|
-
"rollup": "4.9.
|
|
36
|
+
"postcss": "^8.4.33",
|
|
37
|
+
"rollup": "4.9.6",
|
|
38
38
|
"rollup-plugin-postcss": "4.0.2",
|
|
39
39
|
"rollup-plugin-sourcemaps": "0.6.3",
|
|
40
40
|
"yargs": "17.7.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@rollup/plugin-typescript": "11.1.
|
|
43
|
+
"@rollup/plugin-typescript": "11.1.6",
|
|
44
44
|
"tslib": "*",
|
|
45
45
|
"typescript": ">=5.3.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "3520861f5ab7543f57fb873049dabecf9e132e17"
|
|
48
48
|
}
|