@modern-js/app-tools 2.0.0-beta.2 → 2.0.0-beta.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +251 -0
  2. package/bin/modern.js +10 -1
  3. package/dist/js/modern/analyze/constants.js +2 -0
  4. package/dist/js/modern/analyze/generateCode.js +38 -18
  5. package/dist/js/modern/analyze/getServerRoutes.js +3 -3
  6. package/dist/js/modern/analyze/nestedRoutes.js +17 -6
  7. package/dist/js/modern/analyze/templates.js +59 -27
  8. package/dist/js/modern/analyze/utils.js +30 -4
  9. package/dist/js/modern/builder/builderPlugins/compatModern.js +6 -1
  10. package/dist/js/modern/builder/index.js +3 -5
  11. package/dist/js/modern/builder/loaders/routerLoader.js +20 -0
  12. package/dist/js/modern/builder/loaders/serverModuleLoader.js +4 -0
  13. package/dist/js/modern/commands/dev.js +23 -27
  14. package/dist/js/modern/commands/start.js +0 -1
  15. package/dist/js/modern/config/default.js +0 -1
  16. package/dist/js/modern/config/initial/createOutputConfig.js +3 -0
  17. package/dist/js/modern/utils/createFileWatcher.js +1 -1
  18. package/dist/js/modern/utils/restart.js +1 -1
  19. package/dist/js/node/analyze/constants.js +5 -1
  20. package/dist/js/node/analyze/generateCode.js +36 -16
  21. package/dist/js/node/analyze/getServerRoutes.js +3 -3
  22. package/dist/js/node/analyze/nestedRoutes.js +15 -4
  23. package/dist/js/node/analyze/templates.js +60 -27
  24. package/dist/js/node/analyze/utils.js +31 -3
  25. package/dist/js/node/builder/builderPlugins/compatModern.js +6 -1
  26. package/dist/js/node/builder/index.js +3 -5
  27. package/dist/js/node/builder/loaders/routerLoader.js +27 -0
  28. package/dist/js/node/builder/loaders/serverModuleLoader.js +11 -0
  29. package/dist/js/node/commands/dev.js +23 -27
  30. package/dist/js/node/commands/start.js +0 -1
  31. package/dist/js/node/config/default.js +0 -1
  32. package/dist/js/node/config/initial/createOutputConfig.js +3 -0
  33. package/dist/js/node/utils/createFileWatcher.js +2 -1
  34. package/dist/js/node/utils/restart.js +1 -1
  35. package/dist/js/treeshaking/analyze/constants.js +2 -0
  36. package/dist/js/treeshaking/analyze/generateCode.js +137 -81
  37. package/dist/js/treeshaking/analyze/getServerRoutes.js +4 -3
  38. package/dist/js/treeshaking/analyze/nestedRoutes.js +98 -55
  39. package/dist/js/treeshaking/analyze/templates.js +175 -101
  40. package/dist/js/treeshaking/analyze/utils.js +80 -4
  41. package/dist/js/treeshaking/builder/builderPlugins/compatModern.js +6 -1
  42. package/dist/js/treeshaking/builder/index.js +3 -5
  43. package/dist/js/treeshaking/builder/loaders/routerLoader.js +14 -0
  44. package/dist/js/treeshaking/builder/loaders/serverModuleLoader.js +4 -0
  45. package/dist/js/treeshaking/commands/dev.js +37 -38
  46. package/dist/js/treeshaking/commands/start.js +0 -1
  47. package/dist/js/treeshaking/config/default.js +0 -1
  48. package/dist/js/treeshaking/config/initial/createOutputConfig.js +3 -0
  49. package/dist/js/treeshaking/utils/createFileWatcher.js +1 -1
  50. package/dist/js/treeshaking/utils/restart.js +1 -1
  51. package/dist/types/analyze/constants.d.ts +2 -0
  52. package/dist/types/analyze/templates.d.ts +8 -7
  53. package/dist/types/analyze/utils.d.ts +9 -1
  54. package/dist/types/builder/loaders/routerLoader.d.ts +3 -0
  55. package/dist/types/builder/loaders/serverModuleLoader.d.ts +3 -0
  56. package/dist/types/types/config/tools.d.ts +8 -1
  57. package/dist/types/types/hooks.d.ts +2 -1
  58. package/dist/types/utils/createFileWatcher.d.ts +2 -1
  59. package/lib/types.d.ts +1 -1
  60. package/package.json +25 -22
@@ -78,6 +78,11 @@ export var PluginCompatModern = function PluginCompatModern(appContext, modernCo
78
78
  chain.plugin('route-plugin').use(RouterPlugin, [{
79
79
  existNestedRoutes: existNestedRoutes
80
80
  }]);
81
+ if (target !== 'node') {
82
+ var bareServerModuleReg = /\.(server|node)\.[tj]sx?$/;
83
+ chain.module.rule(CHAIN_ID.RULE.JS).exclude.add(bareServerModuleReg);
84
+ chain.module.rule('bare-server-module').test(bareServerModuleReg).use('server-module-loader').loader(require.resolve("../loaders/serverModuleLoader"));
85
+ }
81
86
  function isHtmlEnabled(config, target) {
82
87
  var _config$tools;
83
88
  return ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.htmlPlugin) !== false && target !== 'node' && target !== 'web-worker';
@@ -109,7 +114,7 @@ function applyCallbacks(api, options) {
109
114
  */
110
115
  function applyNodeCompat(chain, modernConfig, isProd) {
111
116
  // apply node resolve extensions
112
- for (var _i = 0, _arr = ['.node.js', '.node.jsx', '.node.ts', '.node.tsx']; _i < _arr.length; _i++) {
117
+ for (var _i = 0, _arr = ['.node.js', '.node.jsx', '.node.ts', '.node.tsx', '.server.js', '.server.ts', '.server.ts', '.server.tsx']; _i < _arr.length; _i++) {
113
118
  var ext = _arr[_i];
114
119
  chain.resolve.extensions.prepend(ext);
115
120
  }
@@ -54,6 +54,7 @@ function _createBuilderForEdenX() {
54
54
  return _createBuilderForEdenX.apply(this, arguments);
55
55
  }
56
56
  export function createBuilderProviderConfig(normalizedConfig, appContext) {
57
+ var _normalizedConfig$ser;
57
58
  var output = createOutputConfig(normalizedConfig, appContext);
58
59
  return _objectSpread(_objectSpread({}, normalizedConfig), {}, {
59
60
  source: _objectSpread(_objectSpread({}, normalizedConfig.source), {}, {
@@ -61,6 +62,7 @@ export function createBuilderProviderConfig(normalizedConfig, appContext) {
61
62
  }),
62
63
  output: output,
63
64
  dev: {
65
+ port: (_normalizedConfig$ser = normalizedConfig.server) === null || _normalizedConfig$ser === void 0 ? void 0 : _normalizedConfig$ser.port,
64
66
  https: normalizedConfig.dev.https,
65
67
  assetPrefix: normalizedConfig.dev.assetPrefix
66
68
  },
@@ -80,11 +82,7 @@ export function createBuilderProviderConfig(normalizedConfig, appContext) {
80
82
  return _objectSpread(_objectSpread({}, config.output), {}, {
81
83
  copy: builderCopy,
82
84
  // We need to do this in the app-tools prepare hook because some files will be generated into the dist directory in the analyze process
83
- cleanDistPath: false,
84
- // `@modern-js/webpack` used to generate asset manifest by default
85
- enableAssetManifest: true,
86
- // compatible the modern-js with fallback behavior
87
- enableAssetFallback: true
85
+ cleanDistPath: false
88
86
  });
89
87
  }
90
88
  }
@@ -0,0 +1,14 @@
1
+ function loader(source) {
2
+ // eslint-disable-next-line @babel/no-invalid-this
3
+ this.cacheable();
4
+ // eslint-disable-next-line @babel/no-invalid-this
5
+ var target = this._compiler.options.target;
6
+ if (target === 'node' || Array.isArray(target) && target.includes('node')) {
7
+ return source;
8
+ }
9
+ // eslint-disable-next-line @babel/no-invalid-this
10
+ var resourcePath = this.resourcePath;
11
+ var code = "\n export { default } from \"".concat(resourcePath, "\";\n ");
12
+ return code;
13
+ }
14
+ export default loader;
@@ -0,0 +1,4 @@
1
+ function loader() {
2
+ return "module.exports = {}";
3
+ }
4
+ export default loader;
@@ -1,7 +1,6 @@
1
1
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
- import { logger } from '@modern-js/utils';
5
4
  import { ResolvedConfigContext } from '@modern-js/core';
6
5
  import { createFileWatcher } from "../utils/createFileWatcher";
7
6
  import { printInstructions } from "../utils/printInstructions";
@@ -12,7 +11,7 @@ import { buildServerConfig } from "../utils/config";
12
11
  export var dev = /*#__PURE__*/function () {
13
12
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(api, options) {
14
13
  var _normalizedConfig$too;
15
- var normalizedConfig, appContext, hookRunners, appDirectory, distDirectory, port, apiOnly, entrypoints, serverConfigFile, serverInternalPlugins, checkedEntries, compiler, app;
14
+ var normalizedConfig, appContext, hookRunners, appDirectory, distDirectory, port, apiOnly, entrypoints, serverConfigFile, serverInternalPlugins, checkedEntries, compiler, serverOptions, app;
16
15
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
17
16
  while (1) {
18
17
  switch (_context2.prev = _context2.next) {
@@ -52,48 +51,42 @@ export var dev = /*#__PURE__*/function () {
52
51
  _context2.next = 16;
53
52
  return hookRunners.beforeDev();
54
53
  case 16:
55
- compiler = null;
56
- if (apiOnly) {
57
- _context2.next = 23;
54
+ if (!(!appContext.builder && !apiOnly)) {
55
+ _context2.next = 18;
58
56
  break;
59
57
  }
60
- if (appContext.builder) {
61
- _context2.next = 20;
58
+ throw new Error('Expect the Builder to have been initialized, But the appContext.builder received `undefined`');
59
+ case 18:
60
+ if (apiOnly) {
61
+ _context2.next = 22;
62
62
  break;
63
63
  }
64
- throw new Error('Expect the Builder to have been initialized, But the appContext.builder received `undefined`');
65
- case 20:
66
- _context2.next = 22;
64
+ _context2.next = 21;
67
65
  return appContext.builder.createCompiler();
68
- case 22:
66
+ case 21:
69
67
  compiler = _context2.sent;
70
- case 23:
71
- _context2.next = 25;
68
+ case 22:
69
+ _context2.next = 24;
72
70
  return generateRoutes(appContext);
73
- case 25:
74
- _context2.next = 27;
75
- return createServer({
76
- dev: _objectSpread(_objectSpread({}, {
77
- client: {
78
- port: port.toString()
79
- },
80
- devMiddleware: {
81
- writeToDisk: function writeToDisk(file) {
82
- return !file.includes('.hot-update.');
83
- }
84
- },
85
- hot: true,
86
- liveReload: true,
71
+ case 24:
72
+ serverOptions = {
73
+ dev: _objectSpread({
87
74
  port: port,
88
75
  https: normalizedConfig.dev.https
89
- }), (_normalizedConfig$too = normalizedConfig.tools) === null || _normalizedConfig$too === void 0 ? void 0 : _normalizedConfig$too.devServer),
90
- compiler: compiler,
76
+ }, (_normalizedConfig$too = normalizedConfig.tools) === null || _normalizedConfig$too === void 0 ? void 0 : _normalizedConfig$too.devServer),
77
+ compiler: compiler || null,
91
78
  pwd: appDirectory,
92
79
  config: normalizedConfig,
93
80
  serverConfigFile: serverConfigFile,
94
81
  internalPlugins: injectDataLoaderPlugin(serverInternalPlugins)
95
- });
96
- case 27:
82
+ };
83
+ if (!apiOnly) {
84
+ _context2.next = 32;
85
+ break;
86
+ }
87
+ _context2.next = 28;
88
+ return createServer(serverOptions);
89
+ case 28:
97
90
  app = _context2.sent;
98
91
  app.listen(port, /*#__PURE__*/function () {
99
92
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err) {
@@ -107,11 +100,7 @@ export var dev = /*#__PURE__*/function () {
107
100
  }
108
101
  throw err;
109
102
  case 2:
110
- if (!apiOnly) {
111
- logger.info("Starting dev server...\n");
112
- } else {
113
- printInstructions(hookRunners, appContext, normalizedConfig);
114
- }
103
+ printInstructions(hookRunners, appContext, normalizedConfig);
115
104
  case 3:
116
105
  case "end":
117
106
  return _context.stop();
@@ -123,9 +112,19 @@ export var dev = /*#__PURE__*/function () {
123
112
  return _ref2.apply(this, arguments);
124
113
  };
125
114
  }());
126
- _context2.next = 31;
115
+ _context2.next = 34;
116
+ break;
117
+ case 32:
118
+ _context2.next = 34;
119
+ return appContext.builder.startDevServer({
120
+ compiler: compiler,
121
+ printURLs: false,
122
+ serverOptions: serverOptions
123
+ });
124
+ case 34:
125
+ _context2.next = 36;
127
126
  return createFileWatcher(appContext, normalizedConfig.source.configDir, hookRunners);
128
- case 31:
127
+ case 36:
129
128
  case "end":
130
129
  return _context2.stop();
131
130
  }
@@ -24,7 +24,6 @@ export var start = /*#__PURE__*/function () {
24
24
  _context2.next = 10;
25
25
  return server({
26
26
  pwd: appDirectory,
27
- // FIXME: remove the `any` type
28
27
  config: userConfig,
29
28
  serverConfigFile: serverConfigFile,
30
29
  internalPlugins: injectDataLoaderPlugin(appContext.serverInternalPlugins),
@@ -33,7 +33,6 @@ export function createDefaultConfig(appContext) {
33
33
  disableFilenameHash: false,
34
34
  enableLatestDecorators: false,
35
35
  polyfill: 'entry',
36
- dataUriLimit: 10000,
37
36
  cssModuleLocalIdentName: undefined
38
37
  };
39
38
  var html = {
@@ -61,6 +61,9 @@ export function createOutputConfig(config) {
61
61
  css: cssModuleLocalIdentName
62
62
  },
63
63
  ssg: ssg,
64
+ // set `true`, only in legacy config
65
+ enableAssetFallback: true,
66
+ enableAssetManifest: true,
64
67
  enableModernMode: enableModernMode,
65
68
  disableNodePolyfill: disableNodePolyfill
66
69
  };
@@ -16,7 +16,7 @@ var getPackageConfig = function getPackageConfig(appDirectory, packageJsonConfig
16
16
  var json = JSON.parse(fs.readFileSync(path.resolve(appDirectory, './package.json'), 'utf8'));
17
17
  return json[packageJsonConfig !== null && packageJsonConfig !== void 0 ? packageJsonConfig : PACKAGE_JSON_CONFIG_NAME];
18
18
  };
19
- var addServerConfigToDeps = /*#__PURE__*/function () {
19
+ export var addServerConfigToDeps = /*#__PURE__*/function () {
20
20
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dependencies, appDirectory, serverConfigFile) {
21
21
  var serverConfig;
22
22
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -19,7 +19,7 @@ function _restart() {
19
19
  case 4:
20
20
  _context.prev = 4;
21
21
  _context.next = 7;
22
- return cli.init(cli.initOptions);
22
+ return cli.init(cli.getPrevInitOptions());
23
23
  case 7:
24
24
  _context.next = 13;
25
25
  break;
@@ -4,6 +4,8 @@ export declare const APP_FILE_NAME = "App";
4
4
  export declare const PAGES_DIR_NAME = "pages";
5
5
  export declare const NESTED_ROUTES_DIR = "routes";
6
6
  export declare const FILE_SYSTEM_ROUTES_FILE_NAME = "routes.js";
7
+ export declare const LOADER_EXPORT_NAME = "loader";
8
+ export declare const TEMP_LOADERS_DIR = "__loaders__";
7
9
  export declare const ENTRY_POINT_FILE_NAME = "index.js";
8
10
  export declare const ENTRY_BOOTSTRAP_FILE_NAME = "bootstrap.js";
9
11
  export declare const FILE_SYSTEM_ROUTES_DYNAMIC_REGEXP: RegExp;
@@ -27,22 +27,23 @@ export declare const html: (partials: {
27
27
  }) => string;
28
28
  export declare const routesForServer: ({
29
29
  routes,
30
- alias
30
+ internalDirectory,
31
+ entryName
31
32
  }: {
32
33
  routes: (NestedRoute | PageRoute)[];
33
- alias: {
34
- name: string;
35
- basename: string;
36
- };
34
+ internalDirectory: string;
35
+ entryName: string;
37
36
  }) => string;
38
37
  export declare const fileSystemRoutes: ({
39
38
  routes,
40
39
  ssrMode,
41
40
  nestedRoutesEntry,
42
- entryName
41
+ entryName,
42
+ internalDirectory
43
43
  }: {
44
44
  routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
45
45
  ssrMode: 'string' | 'stream' | false;
46
46
  nestedRoutesEntry?: string | undefined;
47
47
  entryName: string;
48
- }) => string;
48
+ internalDirectory: string;
49
+ }) => Promise<string>;
@@ -15,4 +15,12 @@ export declare const getDefaultImports: ({
15
15
  internalDirectory: string;
16
16
  }) => ImportStatement[];
17
17
  export declare const isRouteComponentFile: (filePath: string) => boolean;
18
- export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
18
+ export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
19
+ export declare const parseModule: ({
20
+ source,
21
+ filename
22
+ }: {
23
+ source: string;
24
+ filename: string;
25
+ }) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean]>;
26
+ export declare const hasLoader: (filename: string) => Promise<boolean>;
@@ -0,0 +1,3 @@
1
+ import type { LoaderContext } from 'webpack';
2
+ declare function loader(this: LoaderContext<void>, source: string): string;
3
+ export default loader;
@@ -0,0 +1,3 @@
1
+ import { LoaderContext } from 'webpack';
2
+ declare function loader(this: LoaderContext<void>): string;
3
+ export default loader;
@@ -1,5 +1,7 @@
1
1
  import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
2
  import type { JestConfig } from '@modern-js/core';
3
+ import type { PluginSwcOptions } from '@modern-js/builder-plugin-swc';
4
+ import type { PluginEsbuildOptions } from '@modern-js/builder-plugin-esbuild';
3
5
  export declare type BuilderToolsConfig = Required<BuilderConfig>['tools'];
4
6
  /**
5
7
  * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
@@ -10,6 +12,11 @@ export declare type Tailwindcss = Record<string, any> | ((options: Record<string
10
12
  export interface ToolsUserConfig extends BuilderToolsConfig {
11
13
  tailwindcss?: Tailwindcss;
12
14
  jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
13
- esbuild?: Record<string, unknown>;
15
+ esbuild?: PluginEsbuildOptions;
16
+ /**
17
+ * The configuration of `swc` is provided by `swc` plugin.
18
+ * @requires `swc` plugin
19
+ */
20
+ swc?: PluginSwcOptions;
14
21
  }
15
22
  export declare type ToolsNormalizedConfig = ToolsUserConfig;
@@ -1,6 +1,7 @@
1
1
  import type { webpack } from '@modern-js/builder-webpack-provider';
2
2
  import type { AsyncWaterfall, AsyncWorkflow, ParallelWorkflow } from '@modern-js/plugin';
3
3
  import type { Entrypoint, HtmlPartials, NestedRoute, PageRoute, RouteLegacy, ServerRoute } from '@modern-js/types';
4
+ import type { Stats, MultiStats } from '@modern-js/builder-shared';
4
5
  export interface ImportSpecifier {
5
6
  local?: string;
6
7
  imported?: string;
@@ -67,7 +68,7 @@ export declare type AppToolsHooks = {
67
68
  bundlerConfigs?: webpack.Configuration[];
68
69
  }, unknown>;
69
70
  afterBuild: AsyncWorkflow<{
70
- stats?: webpack.Stats | webpack.MultiStats;
71
+ stats?: Stats | MultiStats;
71
72
  }, unknown>;
72
73
  beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
73
74
  afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
@@ -1,3 +1,4 @@
1
- import { IAppContext, ToRunners } from '@modern-js/core';
1
+ import type { IAppContext, ToRunners } from '@modern-js/core';
2
2
  import { AppToolsHooks } from '../types/hooks';
3
+ export declare const addServerConfigToDeps: (dependencies: string[], appDirectory: string, serverConfigFile: string) => Promise<void>;
3
4
  export declare const createFileWatcher: (appContext: IAppContext, configDir: string | undefined, hooksRunner: ToRunners<AppToolsHooks>) => Promise<import("@modern-js/utils").FSWatcher | undefined>;
package/lib/types.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  declare namespace NodeJS {
7
7
  interface ProcessEnv {
8
- readonly NODE_ENV: 'development' | 'production' | 'test';
8
+ NODE_ENV: 'development' | 'production' | 'test';
9
9
  readonly PUBLIC_URL: string;
10
10
  }
11
11
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.2",
14
+ "version": "2.0.0-beta.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -52,30 +52,32 @@
52
52
  }
53
53
  },
54
54
  "bin": {
55
- "modern": "./bin/modern.js"
55
+ "modern": "./bin/modern.js",
56
+ "modern-app": "./bin/modern.js"
56
57
  },
57
58
  "dependencies": {
58
59
  "@babel/parser": "^7.18.0",
59
60
  "@babel/runtime": "^7.18.0",
60
61
  "@babel/traverse": "^7.18.0",
61
62
  "@babel/types": "^7.18.0",
62
- "@modern-js/builder": "2.0.0-beta.2",
63
- "@modern-js/builder-plugin-esbuild": "2.0.0-beta.2",
64
- "@modern-js/builder-plugin-node-polyfill": "2.0.0-beta.2",
65
- "@modern-js/builder-shared": "2.0.0-beta.2",
66
- "@modern-js/builder-webpack-provider": "2.0.0-beta.2",
67
- "@modern-js/core": "2.0.0-beta.2",
68
- "@modern-js/new-action": "2.0.0-beta.2",
69
- "@modern-js/node-bundle-require": "2.0.0-beta.2",
70
- "@modern-js/plugin": "2.0.0-beta.2",
71
- "@modern-js/plugin-data-loader": "2.0.0-beta.2",
72
- "@modern-js/plugin-i18n": "2.0.0-beta.2",
73
- "@modern-js/plugin-lint": "2.0.0-beta.2",
74
- "@modern-js/prod-server": "2.0.0-beta.2",
75
- "@modern-js/server": "2.0.0-beta.2",
76
- "@modern-js/types": "2.0.0-beta.2",
77
- "@modern-js/upgrade": "2.0.0-beta.2",
78
- "@modern-js/utils": "2.0.0-beta.2"
63
+ "es-module-lexer": "^1.1.0",
64
+ "@modern-js/builder": "2.0.0-beta.3",
65
+ "@modern-js/builder-plugin-esbuild": "2.0.0-beta.3",
66
+ "@modern-js/builder-plugin-node-polyfill": "2.0.0-beta.3",
67
+ "@modern-js/builder-shared": "2.0.0-beta.3",
68
+ "@modern-js/builder-webpack-provider": "2.0.0-beta.3",
69
+ "@modern-js/core": "2.0.0-beta.3",
70
+ "@modern-js/new-action": "2.0.0-beta.3",
71
+ "@modern-js/node-bundle-require": "2.0.0-beta.3",
72
+ "@modern-js/plugin": "2.0.0-beta.3",
73
+ "@modern-js/plugin-data-loader": "2.0.0-beta.3",
74
+ "@modern-js/plugin-i18n": "2.0.0-beta.3",
75
+ "@modern-js/plugin-lint": "2.0.0-beta.3",
76
+ "@modern-js/prod-server": "2.0.0-beta.3",
77
+ "@modern-js/server": "2.0.0-beta.3",
78
+ "@modern-js/types": "2.0.0-beta.3",
79
+ "@modern-js/upgrade": "2.0.0-beta.3",
80
+ "@modern-js/utils": "2.0.0-beta.3"
79
81
  },
80
82
  "devDependencies": {
81
83
  "@types/babel__traverse": "^7.14.2",
@@ -84,9 +86,10 @@
84
86
  "jest": "^27",
85
87
  "typescript": "^4",
86
88
  "webpack": "^5.75.0",
87
- "@modern-js/server-core": "2.0.0-beta.2",
88
- "@scripts/build": "2.0.0-beta.2",
89
- "@scripts/jest-config": "2.0.0-beta.2"
89
+ "@modern-js/builder-plugin-swc": "2.0.0-beta.3",
90
+ "@modern-js/server-core": "2.0.0-beta.3",
91
+ "@scripts/build": "2.0.0-beta.3",
92
+ "@scripts/jest-config": "2.0.0-beta.3"
90
93
  },
91
94
  "sideEffects": false,
92
95
  "publishConfig": {