@modern-js/app-tools 2.49.0 → 2.49.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,7 +38,7 @@ async function createWebpackBuilderForModern(options) {
38
38
  const { normalizedConfig } = options;
39
39
  if (normalizedConfig.tools.esbuild) {
40
40
  const { esbuild: esbuildOptions } = normalizedConfig.tools;
41
- const { pluginEsbuild } = await Promise.resolve().then(() => __toESM(require("@rsbuild/plugin-esbuild")));
41
+ const { pluginEsbuild } = await Promise.resolve().then(() => __toESM(require("@modern-js/rsbuild-plugin-esbuild")));
42
42
  builder.addPlugins([
43
43
  pluginEsbuild(esbuildOptions)
44
44
  ]);
@@ -39,6 +39,8 @@ function createDefaultConfig(appContext) {
39
39
  server: "bundles",
40
40
  worker: "worker"
41
41
  },
42
+ // no need to emit assets for SSR bundles
43
+ emitAssets: ({ target }) => target !== "node",
42
44
  cleanDistPath: true,
43
45
  disableNodePolyfill: true,
44
46
  enableInlineRouteManifests: true,
@@ -26,7 +26,7 @@ function _createWebpackBuilderForModern() {
26
26
  _normalizedConfig_tools = normalizedConfig.tools, esbuildOptions = _normalizedConfig_tools.esbuild;
27
27
  return [
28
28
  4,
29
- import("@rsbuild/plugin-esbuild")
29
+ import("@modern-js/rsbuild-plugin-esbuild")
30
30
  ];
31
31
  case 2:
32
32
  pluginEsbuild = _state.sent().pluginEsbuild;
@@ -16,6 +16,11 @@ function createDefaultConfig(appContext) {
16
16
  server: "bundles",
17
17
  worker: "worker"
18
18
  },
19
+ // no need to emit assets for SSR bundles
20
+ emitAssets: function(param) {
21
+ var target = param.target;
22
+ return target !== "node";
23
+ },
19
24
  cleanDistPath: true,
20
25
  disableNodePolyfill: true,
21
26
  enableInlineRouteManifests: true,
@@ -5,7 +5,7 @@ async function createWebpackBuilderForModern(options) {
5
5
  const { normalizedConfig } = options;
6
6
  if (normalizedConfig.tools.esbuild) {
7
7
  const { esbuild: esbuildOptions } = normalizedConfig.tools;
8
- const { pluginEsbuild } = await import("@rsbuild/plugin-esbuild");
8
+ const { pluginEsbuild } = await import("@modern-js/rsbuild-plugin-esbuild");
9
9
  builder.addPlugins([
10
10
  pluginEsbuild(esbuildOptions)
11
11
  ]);
@@ -15,6 +15,8 @@ function createDefaultConfig(appContext) {
15
15
  server: "bundles",
16
16
  worker: "worker"
17
17
  },
18
+ // no need to emit assets for SSR bundles
19
+ emitAssets: ({ target }) => target !== "node",
18
20
  cleanDistPath: true,
19
21
  disableNodePolyfill: true,
20
22
  enableInlineRouteManifests: true,
@@ -1,6 +1,6 @@
1
1
  import type { JestConfig } from '@modern-js/types';
2
2
  import type { PluginSwcOptions } from '@rsbuild/plugin-swc';
3
- import type { PluginEsbuildOptions } from '@rsbuild/plugin-esbuild';
3
+ import type { PluginEsbuildOptions } from '@modern-js/rsbuild-plugin-esbuild';
4
4
  import type { UniBuilderConfig } from '@modern-js/uni-builder';
5
5
  import type { UnwrapBuilderConfig, Bundler } from '../utils';
6
6
  export type Tailwindcss = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.49.0",
18
+ "version": "2.49.1",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -69,30 +69,30 @@
69
69
  "@babel/parser": "^7.22.15",
70
70
  "@babel/traverse": "^7.23.2",
71
71
  "@babel/types": "^7.23.0",
72
- "@rsbuild/plugin-esbuild": "0.6.3",
73
- "@rsbuild/plugin-node-polyfill": "0.6.3",
74
- "@rsbuild/shared": "0.6.3",
75
- "@rsbuild/core": "0.6.3",
72
+ "@rsbuild/plugin-node-polyfill": "0.6.6",
73
+ "@rsbuild/shared": "0.6.6",
74
+ "@rsbuild/core": "0.6.6",
76
75
  "es-module-lexer": "^1.1.0",
77
76
  "esbuild": "0.17.19",
78
77
  "@swc/helpers": "0.5.3",
79
78
  "esbuild-register": "^3.5.0",
80
- "@modern-js/core": "2.49.0",
81
- "@modern-js/plugin-data-loader": "2.49.0",
82
- "@modern-js/plugin": "2.49.0",
83
- "@modern-js/node-bundle-require": "2.49.0",
84
- "@modern-js/plugin-i18n": "2.49.0",
85
- "@modern-js/prod-server": "2.49.0",
86
- "@modern-js/plugin-lint": "2.49.0",
87
- "@modern-js/server-core": "2.49.0",
88
- "@modern-js/server": "2.49.0",
89
- "@modern-js/server-utils": "2.49.0",
90
- "@modern-js/types": "2.49.0",
91
- "@modern-js/uni-builder": "2.49.0",
92
- "@modern-js/utils": "2.49.0"
79
+ "@modern-js/core": "2.49.1",
80
+ "@modern-js/node-bundle-require": "2.49.1",
81
+ "@modern-js/plugin": "2.49.1",
82
+ "@modern-js/plugin-data-loader": "2.49.1",
83
+ "@modern-js/plugin-i18n": "2.49.1",
84
+ "@modern-js/prod-server": "2.49.1",
85
+ "@modern-js/plugin-lint": "2.49.1",
86
+ "@modern-js/server-utils": "2.49.1",
87
+ "@modern-js/server-core": "2.49.1",
88
+ "@modern-js/server": "2.49.1",
89
+ "@modern-js/types": "2.49.1",
90
+ "@modern-js/utils": "2.49.1",
91
+ "@modern-js/uni-builder": "2.49.1",
92
+ "@modern-js/rsbuild-plugin-esbuild": "2.49.1"
93
93
  },
94
94
  "devDependencies": {
95
- "@rsbuild/plugin-swc": "0.6.3",
95
+ "@rsbuild/plugin-swc": "0.6.6",
96
96
  "@types/babel__traverse": "7.18.5",
97
97
  "@types/jest": "^29",
98
98
  "@types/node": "^14",
@@ -101,8 +101,8 @@
101
101
  "tsconfig-paths": "^4.2.0",
102
102
  "typescript": "^5",
103
103
  "webpack": "^5.91.0",
104
- "@scripts/jest-config": "2.49.0",
105
- "@scripts/build": "2.49.0"
104
+ "@scripts/build": "2.49.1",
105
+ "@scripts/jest-config": "2.49.1"
106
106
  },
107
107
  "sideEffects": false,
108
108
  "publishConfig": {