@bleedingdev/modern-js-builder 3.9.0-ultramodern.12 → 3.9.0-ultramodern.14

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.
@@ -88,14 +88,13 @@ const pluginEnvironmentDefaults = (distPath = {})=>({
88
88
  });
89
89
  api.modifyBundlerChain(async (chain, { environment })=>{
90
90
  const isServiceWorker = environment.name === utils_js_namespaceObject.SERVICE_WORKER_ENVIRONMENT_NAME;
91
- if (isServiceWorker && true === chain.output.get('module')) chain.output.library({
92
- ...chain.output.get('library') || {},
93
- type: 'module'
94
- });
95
- else if (isServiceWorker) chain.output.library({
96
- ...chain.output.get('library') || {},
97
- type: 'commonjs2'
98
- });
91
+ if (isServiceWorker) {
92
+ const library = chain.output.get('library');
93
+ chain.output.library({
94
+ ...'object' == typeof library && !Array.isArray(library) ? library : {},
95
+ type: true === chain.output.get('module') ? 'module' : 'commonjs2'
96
+ });
97
+ }
99
98
  });
100
99
  }
101
100
  });
@@ -40,7 +40,7 @@ const pluginManifest = ()=>({
40
40
  chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
41
41
  {
42
42
  fileName: 'web' === target ? 'asset-manifest.json' : `asset-manifest-${target}.json`,
43
- publicPath,
43
+ publicPath: 'string' == typeof publicPath ? publicPath : void 0,
44
44
  generate: manifest_js_namespaceObject.generateManifest
45
45
  }
46
46
  ]);
@@ -56,14 +56,13 @@ const pluginEnvironmentDefaults = (distPath = {})=>({
56
56
  });
57
57
  api.modifyBundlerChain(async (chain, { environment })=>{
58
58
  const isServiceWorker = environment.name === SERVICE_WORKER_ENVIRONMENT_NAME;
59
- if (isServiceWorker && true === chain.output.get('module')) chain.output.library({
60
- ...chain.output.get('library') || {},
61
- type: 'module'
62
- });
63
- else if (isServiceWorker) chain.output.library({
64
- ...chain.output.get('library') || {},
65
- type: 'commonjs2'
66
- });
59
+ if (isServiceWorker) {
60
+ const library = chain.output.get('library');
61
+ chain.output.library({
62
+ ...'object' == typeof library && !Array.isArray(library) ? library : {},
63
+ type: true === chain.output.get('module') ? 'module' : 'commonjs2'
64
+ });
65
+ }
67
66
  });
68
67
  }
69
68
  });
@@ -8,7 +8,7 @@ const pluginManifest = ()=>({
8
8
  chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
9
9
  {
10
10
  fileName: 'web' === target ? 'asset-manifest.json' : `asset-manifest-${target}.json`,
11
- publicPath,
11
+ publicPath: 'string' == typeof publicPath ? publicPath : void 0,
12
12
  generate: generateManifest
13
13
  }
14
14
  ]);
@@ -57,14 +57,13 @@ const pluginEnvironmentDefaults = (distPath = {})=>({
57
57
  });
58
58
  api.modifyBundlerChain(async (chain, { environment })=>{
59
59
  const isServiceWorker = environment.name === SERVICE_WORKER_ENVIRONMENT_NAME;
60
- if (isServiceWorker && true === chain.output.get('module')) chain.output.library({
61
- ...chain.output.get('library') || {},
62
- type: 'module'
63
- });
64
- else if (isServiceWorker) chain.output.library({
65
- ...chain.output.get('library') || {},
66
- type: 'commonjs2'
67
- });
60
+ if (isServiceWorker) {
61
+ const library = chain.output.get('library');
62
+ chain.output.library({
63
+ ...'object' == typeof library && !Array.isArray(library) ? library : {},
64
+ type: true === chain.output.get('module') ? 'module' : 'commonjs2'
65
+ });
66
+ }
68
67
  });
69
68
  }
70
69
  });
@@ -9,7 +9,7 @@ const pluginManifest = ()=>({
9
9
  chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(RspackManifestPlugin, [
10
10
  {
11
11
  fileName: 'web' === target ? 'asset-manifest.json' : `asset-manifest-${target}.json`,
12
- publicPath,
12
+ publicPath: 'string' == typeof publicPath ? publicPath : void 0,
13
13
  generate: generateManifest
14
14
  }
15
15
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bleedingdev/modern-js-builder",
3
- "version": "3.9.0-ultramodern.12",
3
+ "version": "3.9.0-ultramodern.14",
4
4
  "description": "A builder for Modern.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,8 +27,8 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@jridgewell/trace-mapping": "^0.3.31",
30
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.12",
31
- "@rsbuild/core": "2.2.3",
30
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.14",
31
+ "@rsbuild/core": "2.2.9",
32
32
  "@rsbuild/plugin-assets-retry": "2.0.2",
33
33
  "@rsbuild/plugin-check-syntax": "2.0.1",
34
34
  "@rsbuild/plugin-css-minimizer": "2.0.1",
@@ -36,16 +36,16 @@
36
36
  "@rsbuild/plugin-react": "2.1.0",
37
37
  "@rsbuild/plugin-rem": "1.0.6",
38
38
  "@rsbuild/plugin-sass": "2.0.1",
39
- "@rsbuild/plugin-source-build": "1.0.6",
39
+ "@rsbuild/plugin-source-build": "1.0.7",
40
40
  "@rsbuild/plugin-svgr": "2.0.5",
41
41
  "@rsbuild/plugin-type-check": "1.6.0",
42
42
  "@rsbuild/plugin-typed-css-modules": "1.2.4",
43
43
  "@swc/core": "1.16.2",
44
44
  "@swc/helpers": "^0.5.23",
45
- "autoprefixer": "10.5.5",
46
- "browserslist": "4.28.9",
45
+ "autoprefixer": "10.6.1",
46
+ "browserslist": "4.29.0",
47
47
  "core-js": "^3.50.0",
48
- "cssnano": "9.0.3",
48
+ "cssnano": "9.0.5",
49
49
  "html-minifier-terser": "^7.2.0",
50
50
  "lodash": "^4.18.1",
51
51
  "postcss": "^8.5.28",
@@ -57,17 +57,17 @@
57
57
  "postcss-nesting": "14.0.1",
58
58
  "postcss-page-break": "3.0.4",
59
59
  "rspack-manifest-plugin": "5.2.2",
60
- "sass-embedded": "1.100.0",
60
+ "sass-embedded": "1.105.0",
61
61
  "ts-deepmerge": "8.0.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.12",
65
- "@rsdoctor/rspack-plugin": "^1.6.3",
66
- "@rslib/core": "1.0.0",
64
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.14",
65
+ "@rsdoctor/rspack-plugin": "^1.6.4",
66
+ "@rslib/core": "1.0.2",
67
67
  "@scripts/rstest-config": "2.66.0",
68
68
  "@types/html-minifier-terser": "^7.0.2",
69
69
  "@types/lodash": "^4.17.25",
70
- "react": "^19.2.8",
70
+ "react": "^19.3.0",
71
71
  "react-server-dom-rspack": "0.1.0",
72
72
  "rsbuild-plugin-rsc": "0.1.1",
73
73
  "terser": "^5.51.2",