@modern-js/app-tools 2.22.0 → 2.23.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/CHANGELOG.md +106 -0
- package/dist/cjs/analyze/getBundleEntry.js +4 -3
- package/dist/cjs/analyze/index.js +5 -11
- package/dist/cjs/analyze/utils.js +14 -0
- package/dist/cjs/commands/serve.js +1 -1
- package/dist/cjs/index.js +11 -3
- package/dist/cjs/schema/index.js +1 -17
- package/dist/esm/analyze/getBundleEntry.js +5 -2
- package/dist/esm/analyze/index.js +8 -14
- package/dist/esm/analyze/utils.js +12 -1
- package/dist/esm/commands/serve.js +1 -1
- package/dist/esm/index.js +26 -10
- package/dist/esm/schema/index.js +1 -17
- package/dist/esm-node/analyze/getBundleEntry.js +4 -3
- package/dist/esm-node/analyze/index.js +7 -13
- package/dist/esm-node/analyze/utils.js +12 -1
- package/dist/esm-node/commands/serve.js +1 -1
- package/dist/esm-node/index.js +11 -3
- package/dist/esm-node/schema/index.js +1 -17
- package/dist/types/analyze/utils.d.ts +2 -1
- package/dist/types/types/config/tools.d.ts +11 -6
- package/package.json +26 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,111 @@
|
|
|
1
1
|
# @modern-js/app-tools
|
|
2
2
|
|
|
3
|
+
## 2.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b185fdf: refactor: merge the swc plugin
|
|
8
|
+
refactor: 合并 swc 插件
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 162fb9d: fix: should only restart when changed file is watched
|
|
13
|
+
fix: 只有在变化的文件被监听是才重启
|
|
14
|
+
- 7e6fb5f: chore: publishConfig add provenance config
|
|
15
|
+
|
|
16
|
+
chore: publishConfig 增加 provenance 配置
|
|
17
|
+
|
|
18
|
+
- b593040: fix(app-tools): incorrect tools.tailwindcss schema
|
|
19
|
+
|
|
20
|
+
fix(app-tools): 修复 tools.tailwindcss schema 错误
|
|
21
|
+
|
|
22
|
+
- 6dec7c2: test(utils): reuse the snapshot serializer of vitest config
|
|
23
|
+
|
|
24
|
+
test(utils): 复用 vitest 的 snapshot serializer
|
|
25
|
+
|
|
26
|
+
- c3216b5: chore: split the scheme into the plugin
|
|
27
|
+
|
|
28
|
+
chore: 拆分 scheme 到插件内部
|
|
29
|
+
|
|
30
|
+
- e5259fb: fix: absoluteEntryDir should support directory entry
|
|
31
|
+
fix: absoluteEntryDir 应该支持配置目录 entry,这里 document 会使用
|
|
32
|
+
- Updated dependencies [15eac36]
|
|
33
|
+
- Updated dependencies [a912b66]
|
|
34
|
+
- Updated dependencies [9b270b6]
|
|
35
|
+
- Updated dependencies [d4e85c1]
|
|
36
|
+
- Updated dependencies [7e6fb5f]
|
|
37
|
+
- Updated dependencies [a7a7ad7]
|
|
38
|
+
- Updated dependencies [f212633]
|
|
39
|
+
- Updated dependencies [b593040]
|
|
40
|
+
- Updated dependencies [e2245c3]
|
|
41
|
+
- Updated dependencies [5684381]
|
|
42
|
+
- Updated dependencies [6dec7c2]
|
|
43
|
+
- Updated dependencies [c3216b5]
|
|
44
|
+
- Updated dependencies [f14f920]
|
|
45
|
+
- Updated dependencies [692cc0e]
|
|
46
|
+
- Updated dependencies [38eccef]
|
|
47
|
+
- Updated dependencies [e5259fb]
|
|
48
|
+
- Updated dependencies [f91c557]
|
|
49
|
+
- Updated dependencies [65721f2]
|
|
50
|
+
- Updated dependencies [a82d6f7]
|
|
51
|
+
- @modern-js/builder-webpack-provider@2.23.0
|
|
52
|
+
- @modern-js/builder-rspack-provider@2.23.0
|
|
53
|
+
- @modern-js/builder-shared@2.23.0
|
|
54
|
+
- @modern-js/builder@2.23.0
|
|
55
|
+
- @modern-js/builder-plugin-node-polyfill@2.23.0
|
|
56
|
+
- @modern-js/node-bundle-require@2.23.0
|
|
57
|
+
- @modern-js/builder-plugin-esbuild@2.23.0
|
|
58
|
+
- @modern-js/plugin-data-loader@2.23.0
|
|
59
|
+
- @modern-js/new-action@2.23.0
|
|
60
|
+
- @modern-js/prod-server@2.23.0
|
|
61
|
+
- @modern-js/plugin-i18n@2.23.0
|
|
62
|
+
- @modern-js/plugin-lint@2.23.0
|
|
63
|
+
- @modern-js/upgrade@2.23.0
|
|
64
|
+
- @modern-js/plugin@2.23.0
|
|
65
|
+
- @modern-js/server@2.23.0
|
|
66
|
+
- @modern-js/types@2.23.0
|
|
67
|
+
- @modern-js/utils@2.23.0
|
|
68
|
+
- @modern-js/core@2.23.0
|
|
69
|
+
|
|
70
|
+
## 2.22.1
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- 664f414: fix(app-tools): should not delete internalDir because we need guarantee the dev, build command correct.
|
|
75
|
+
fix(app-tools): 不应该在非构建模式下删除 internalDir,因为我们需要保证这些构建模式的入口是正确的
|
|
76
|
+
- Updated dependencies [25b490a]
|
|
77
|
+
- Updated dependencies [e2848a2]
|
|
78
|
+
- Updated dependencies [a470c04]
|
|
79
|
+
- Updated dependencies [95ffa6b]
|
|
80
|
+
- Updated dependencies [12d54ae]
|
|
81
|
+
- Updated dependencies [bd4b150]
|
|
82
|
+
- Updated dependencies [c739207]
|
|
83
|
+
- Updated dependencies [c465db6]
|
|
84
|
+
- Updated dependencies [dd36311]
|
|
85
|
+
- Updated dependencies [d4045ed]
|
|
86
|
+
- Updated dependencies [8bd9981]
|
|
87
|
+
- Updated dependencies [1f02cd2]
|
|
88
|
+
- Updated dependencies [cfcf003]
|
|
89
|
+
- Updated dependencies [15181be]
|
|
90
|
+
- @modern-js/types@2.22.1
|
|
91
|
+
- @modern-js/utils@2.22.1
|
|
92
|
+
- @modern-js/builder-webpack-provider@2.22.1
|
|
93
|
+
- @modern-js/builder-rspack-provider@2.22.1
|
|
94
|
+
- @modern-js/builder-shared@2.22.1
|
|
95
|
+
- @modern-js/builder@2.22.1
|
|
96
|
+
- @modern-js/server@2.22.1
|
|
97
|
+
- @modern-js/prod-server@2.22.1
|
|
98
|
+
- @modern-js/core@2.22.1
|
|
99
|
+
- @modern-js/plugin-data-loader@2.22.1
|
|
100
|
+
- @modern-js/builder-plugin-esbuild@2.22.1
|
|
101
|
+
- @modern-js/builder-plugin-node-polyfill@2.22.1
|
|
102
|
+
- @modern-js/plugin-i18n@2.22.1
|
|
103
|
+
- @modern-js/plugin-lint@2.22.1
|
|
104
|
+
- @modern-js/new-action@2.22.1
|
|
105
|
+
- @modern-js/node-bundle-require@2.22.1
|
|
106
|
+
- @modern-js/plugin@2.22.1
|
|
107
|
+
- @modern-js/upgrade@2.22.1
|
|
108
|
+
|
|
3
109
|
## 2.22.0
|
|
4
110
|
|
|
5
111
|
### Minor Changes
|
|
@@ -19,6 +19,7 @@ const ensureExtensions = (file) => {
|
|
|
19
19
|
}
|
|
20
20
|
return file;
|
|
21
21
|
};
|
|
22
|
+
const isDirectory = (file) => !_path.default.extname(file);
|
|
22
23
|
const ifAlreadyExists = (entrypoints, checked) => entrypoints.some((entrypoint) => {
|
|
23
24
|
if (ensureExtensions(entrypoint.entry) === ensureExtensions(checked.entry)) {
|
|
24
25
|
checked.entryName = entrypoint.entryName;
|
|
@@ -34,7 +35,7 @@ const ifAlreadyExists = (entrypoints, checked) => entrypoints.some((entrypoint)
|
|
|
34
35
|
});
|
|
35
36
|
const getBundleEntry = (appContext, config) => {
|
|
36
37
|
const { appDirectory, packageName } = appContext;
|
|
37
|
-
const {
|
|
38
|
+
const { disableDefaultEntries, entries, entriesDir } = config.source;
|
|
38
39
|
const defaults = disableDefaultEntries ? [] : (0, _getFileSystemEntry.getFileSystemEntry)(appContext, config);
|
|
39
40
|
if (entries) {
|
|
40
41
|
Object.keys(entries).forEach((name) => {
|
|
@@ -42,13 +43,13 @@ const getBundleEntry = (appContext, config) => {
|
|
|
42
43
|
const entrypoint = typeof value === "string" ? {
|
|
43
44
|
entryName: name,
|
|
44
45
|
entry: (0, _utils.ensureAbsolutePath)(appDirectory, value),
|
|
45
|
-
absoluteEntryDir: _path.default.dirname((0, _utils.ensureAbsolutePath)(appDirectory, value)),
|
|
46
|
+
absoluteEntryDir: isDirectory((0, _utils.ensureAbsolutePath)(appDirectory, value)) ? (0, _utils.ensureAbsolutePath)(appDirectory, value) : _path.default.dirname((0, _utils.ensureAbsolutePath)(appDirectory, value)),
|
|
46
47
|
isAutoMount: true,
|
|
47
48
|
fileSystemRoutes: _utils.fs.statSync((0, _utils.ensureAbsolutePath)(appDirectory, value)).isDirectory() ? {} : void 0
|
|
48
49
|
} : {
|
|
49
50
|
entryName: name,
|
|
50
51
|
entry: (0, _utils.ensureAbsolutePath)(appDirectory, value.entry),
|
|
51
|
-
absoluteEntryDir: _path.default.dirname((0, _utils.ensureAbsolutePath)(appDirectory, value.entry)),
|
|
52
|
+
absoluteEntryDir: isDirectory((0, _utils.ensureAbsolutePath)(appDirectory, value.entry)) ? (0, _utils.ensureAbsolutePath)(appDirectory, value.entry) : _path.default.dirname((0, _utils.ensureAbsolutePath)(appDirectory, value.entry)),
|
|
52
53
|
isAutoMount: !value.disableMount,
|
|
53
54
|
customBootstrap: value.customBootstrap && (0, _utils.ensureAbsolutePath)(appDirectory, value.customBootstrap),
|
|
54
55
|
fileSystemRoutes: _utils.fs.statSync((0, _utils.ensureAbsolutePath)(appDirectory, value.entry)).isDirectory() ? {} : void 0
|
|
@@ -36,10 +36,12 @@ const _default = ({ bundler }) => {
|
|
|
36
36
|
const resolvedConfig = api.useResolvedConfigContext();
|
|
37
37
|
const hookRunners = api.useHookRunners();
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
if ((0, _utils1.checkIsBuildCommands)()) {
|
|
40
|
+
_utils.fs.emptydirSync(appContext.internalDirectory);
|
|
41
|
+
}
|
|
40
42
|
} catch {
|
|
41
43
|
}
|
|
42
|
-
const apiOnly = await (0, _utils.isApiOnly)(appContext.appDirectory, (_resolvedConfig_source = resolvedConfig.source) === null || _resolvedConfig_source === void 0 ? void 0 : _resolvedConfig_source.entriesDir);
|
|
44
|
+
const apiOnly = await (0, _utils.isApiOnly)(appContext.appDirectory, (_resolvedConfig_source = resolvedConfig.source) === null || _resolvedConfig_source === void 0 ? void 0 : _resolvedConfig_source.entriesDir, appContext.apiDirectory);
|
|
43
45
|
await hookRunners.addRuntimeExports();
|
|
44
46
|
if (apiOnly) {
|
|
45
47
|
const { routes: routes2 } = await hookRunners.modifyServerRoutes({
|
|
@@ -101,15 +103,7 @@ const _default = ({ bundler }) => {
|
|
|
101
103
|
htmlTemplates
|
|
102
104
|
};
|
|
103
105
|
api.setAppContext(appContext);
|
|
104
|
-
|
|
105
|
-
const buildCommands = [
|
|
106
|
-
"dev",
|
|
107
|
-
"start",
|
|
108
|
-
"build",
|
|
109
|
-
"inspect",
|
|
110
|
-
"deploy"
|
|
111
|
-
];
|
|
112
|
-
if (buildCommands.includes(command)) {
|
|
106
|
+
if ((0, _utils1.checkIsBuildCommands)()) {
|
|
113
107
|
const normalizedConfig = api.useResolvedConfigContext();
|
|
114
108
|
const createBuilderForModern = await (0, _builder.createBuilderGenerator)(bundler);
|
|
115
109
|
const builder = await createBuilderForModern({
|
|
@@ -33,6 +33,9 @@ _export(exports, {
|
|
|
33
33
|
},
|
|
34
34
|
getServerCombinedModueFile: function() {
|
|
35
35
|
return getServerCombinedModueFile;
|
|
36
|
+
},
|
|
37
|
+
checkIsBuildCommands: function() {
|
|
38
|
+
return checkIsBuildCommands;
|
|
36
39
|
}
|
|
37
40
|
});
|
|
38
41
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
@@ -175,3 +178,14 @@ const getServerLoadersFile = (internalDirectory, entryName) => {
|
|
|
175
178
|
const getServerCombinedModueFile = (internalDirectory, entryName) => {
|
|
176
179
|
return _path.default.join(internalDirectory, entryName, "server-loader-combined.js");
|
|
177
180
|
};
|
|
181
|
+
const checkIsBuildCommands = () => {
|
|
182
|
+
const buildCommands = [
|
|
183
|
+
"dev",
|
|
184
|
+
"start",
|
|
185
|
+
"build",
|
|
186
|
+
"inspect",
|
|
187
|
+
"deploy"
|
|
188
|
+
];
|
|
189
|
+
const command = (0, _utils.getCommand)();
|
|
190
|
+
return buildCommands.includes(command);
|
|
191
|
+
};
|
|
@@ -21,7 +21,7 @@ const start = async (api) => {
|
|
|
21
21
|
const hookRunners = api.useHookRunners();
|
|
22
22
|
const { appDirectory, port, serverConfigFile } = appContext;
|
|
23
23
|
_utils.logger.log(_utils.chalk.cyan(`Starting the modern server...`));
|
|
24
|
-
const apiOnly = await (0, _utils.isApiOnly)(appContext.appDirectory, userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.entriesDir);
|
|
24
|
+
const apiOnly = await (0, _utils.isApiOnly)(appContext.appDirectory, userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.entriesDir, appContext.apiDirectory);
|
|
25
25
|
const serverInternalPlugins = await (0, _getServerInternalPlugins.getServerInternalPlugins)(api);
|
|
26
26
|
const app = await (0, _prodserver.default)({
|
|
27
27
|
pwd: appDirectory,
|
package/dist/cjs/index.js
CHANGED
|
@@ -112,6 +112,12 @@ const _default = (options = {
|
|
|
112
112
|
],
|
|
113
113
|
setup: (api) => {
|
|
114
114
|
const appContext = api.useAppContext();
|
|
115
|
+
let watchedFiles = [];
|
|
116
|
+
const isWatched = (fn) => {
|
|
117
|
+
return watchedFiles.some((ff) => {
|
|
118
|
+
return fn.includes(ff);
|
|
119
|
+
});
|
|
120
|
+
};
|
|
115
121
|
api.setAppContext({
|
|
116
122
|
...appContext,
|
|
117
123
|
toolsType: "app-tools"
|
|
@@ -172,15 +178,17 @@ const _default = (options = {
|
|
|
172
178
|
async watchFiles() {
|
|
173
179
|
const appContext2 = api.useAppContext();
|
|
174
180
|
const config = api.useResolvedConfigContext();
|
|
175
|
-
|
|
181
|
+
const files = await (0, _generateWatchFiles.generateWatchFiles)(appContext2, config.source.configDir);
|
|
182
|
+
watchedFiles = files;
|
|
183
|
+
return files;
|
|
176
184
|
},
|
|
177
185
|
// 这里会被 core/initWatcher 监听的文件变动触发,如果是 src 目录下的文件变动,则不做 restart
|
|
178
186
|
async fileChange(e) {
|
|
179
187
|
const { filename, eventType } = e;
|
|
180
188
|
const appContext2 = api.useAppContext();
|
|
181
|
-
const { appDirectory
|
|
189
|
+
const { appDirectory } = appContext2;
|
|
182
190
|
const absolutePath = _path.default.resolve(appDirectory, filename);
|
|
183
|
-
if (
|
|
191
|
+
if (isWatched(absolutePath) && (eventType === "change" || eventType === "unlink")) {
|
|
184
192
|
const { closeServer } = await Promise.resolve().then(() => /* @__PURE__ */ _interop_require_wildcard._(require("./utils/createServer")));
|
|
185
193
|
await closeServer();
|
|
186
194
|
await (0, _restart.restart)(api.useHookRunners(), filename);
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -166,29 +166,13 @@ const server = {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
const tools = {
|
|
169
|
-
tailwindcss: {
|
|
170
|
-
type: "object"
|
|
171
|
-
},
|
|
172
|
-
jest: {
|
|
173
|
-
typeof: [
|
|
174
|
-
"object",
|
|
175
|
-
"function"
|
|
176
|
-
]
|
|
177
|
-
},
|
|
178
169
|
esbuild: {
|
|
179
170
|
typeof: [
|
|
180
171
|
"object"
|
|
181
172
|
]
|
|
182
173
|
}
|
|
183
174
|
};
|
|
184
|
-
const deploy = {
|
|
185
|
-
microFrontend: {
|
|
186
|
-
type: [
|
|
187
|
-
"boolean",
|
|
188
|
-
"object"
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
};
|
|
175
|
+
const deploy = {};
|
|
192
176
|
const builderPlugins = {
|
|
193
177
|
type: "array"
|
|
194
178
|
};
|
|
@@ -10,6 +10,9 @@ var ensureExtensions = function(file) {
|
|
|
10
10
|
}
|
|
11
11
|
return file;
|
|
12
12
|
};
|
|
13
|
+
var isDirectory = function(file) {
|
|
14
|
+
return !path.extname(file);
|
|
15
|
+
};
|
|
13
16
|
var ifAlreadyExists = function(entrypoints, checked) {
|
|
14
17
|
return entrypoints.some(function(entrypoint) {
|
|
15
18
|
if (ensureExtensions(entrypoint.entry) === ensureExtensions(checked.entry)) {
|
|
@@ -32,13 +35,13 @@ export var getBundleEntry = function(appContext, config) {
|
|
|
32
35
|
var entrypoint = typeof value === "string" ? {
|
|
33
36
|
entryName: name,
|
|
34
37
|
entry: ensureAbsolutePath(appDirectory, value),
|
|
35
|
-
absoluteEntryDir: path.dirname(ensureAbsolutePath(appDirectory, value)),
|
|
38
|
+
absoluteEntryDir: isDirectory(ensureAbsolutePath(appDirectory, value)) ? ensureAbsolutePath(appDirectory, value) : path.dirname(ensureAbsolutePath(appDirectory, value)),
|
|
36
39
|
isAutoMount: true,
|
|
37
40
|
fileSystemRoutes: fs.statSync(ensureAbsolutePath(appDirectory, value)).isDirectory() ? {} : void 0
|
|
38
41
|
} : {
|
|
39
42
|
entryName: name,
|
|
40
43
|
entry: ensureAbsolutePath(appDirectory, value.entry),
|
|
41
|
-
absoluteEntryDir: path.dirname(ensureAbsolutePath(appDirectory, value.entry)),
|
|
44
|
+
absoluteEntryDir: isDirectory(ensureAbsolutePath(appDirectory, value.entry)) ? ensureAbsolutePath(appDirectory, value.entry) : path.dirname(ensureAbsolutePath(appDirectory, value.entry)),
|
|
42
45
|
isAutoMount: !value.disableMount,
|
|
43
46
|
customBootstrap: value.customBootstrap && ensureAbsolutePath(appDirectory, value.customBootstrap),
|
|
44
47
|
fileSystemRoutes: fs.statSync(ensureAbsolutePath(appDirectory, value.entry)).isDirectory() ? {} : void 0
|
|
@@ -4,7 +4,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
4
4
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
5
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
6
6
|
import * as path from "path";
|
|
7
|
-
import { createDebugger, findExists, fs, isApiOnly, minimist,
|
|
7
|
+
import { createDebugger, findExists, fs, isApiOnly, minimist, isDevCommand, getArgv } from "@modern-js/utils";
|
|
8
8
|
import { cloneDeep } from "@modern-js/utils/lodash";
|
|
9
9
|
import { printInstructions } from "../utils/printInstructions";
|
|
10
10
|
import { generateRoutes } from "../utils/routes";
|
|
@@ -12,7 +12,7 @@ import { emitResolvedConfig } from "../utils/config";
|
|
|
12
12
|
import { getSelectedEntries } from "../utils/getSelectedEntries";
|
|
13
13
|
import { initialNormalizedConfig } from "../config";
|
|
14
14
|
import { createBuilderGenerator } from "../builder";
|
|
15
|
-
import { isPageComponentFile, parseModule, replaceWithAlias } from "./utils";
|
|
15
|
+
import { checkIsBuildCommands, isPageComponentFile, parseModule, replaceWithAlias } from "./utils";
|
|
16
16
|
import { APP_CONFIG_NAME, APP_INIT_EXPORTED, APP_INIT_IMPORTED } from "./constants";
|
|
17
17
|
import { generateIndexCode } from "./generateCode";
|
|
18
18
|
var debug = createDebugger("plugin-analyze");
|
|
@@ -27,7 +27,7 @@ export default function(param) {
|
|
|
27
27
|
return {
|
|
28
28
|
prepare: function prepare() {
|
|
29
29
|
return _async_to_generator(function() {
|
|
30
|
-
var _resolvedConfig_source, appContext, resolvedConfig, hookRunners, apiOnly, routes, _ref, getBundleEntry, getServerRoutes, generateCode, getHtmlTemplate, entrypoints, initialRoutes, routes1, importsStatemets, htmlTemplates, checkedEntries, entry,
|
|
30
|
+
var _resolvedConfig_source, appContext, resolvedConfig, hookRunners, apiOnly, routes, _ref, getBundleEntry, getServerRoutes, generateCode, getHtmlTemplate, entrypoints, initialRoutes, routes1, importsStatemets, htmlTemplates, checkedEntries, entry, normalizedConfig, createBuilderForModern, builder;
|
|
31
31
|
return _ts_generator(this, function(_state) {
|
|
32
32
|
switch (_state.label) {
|
|
33
33
|
case 0:
|
|
@@ -35,12 +35,14 @@ export default function(param) {
|
|
|
35
35
|
resolvedConfig = api.useResolvedConfigContext();
|
|
36
36
|
hookRunners = api.useHookRunners();
|
|
37
37
|
try {
|
|
38
|
-
|
|
38
|
+
if (checkIsBuildCommands()) {
|
|
39
|
+
fs.emptydirSync(appContext.internalDirectory);
|
|
40
|
+
}
|
|
39
41
|
} catch (e) {
|
|
40
42
|
}
|
|
41
43
|
return [
|
|
42
44
|
4,
|
|
43
|
-
isApiOnly(appContext.appDirectory, (_resolvedConfig_source = resolvedConfig.source) === null || _resolvedConfig_source === void 0 ? void 0 : _resolvedConfig_source.entriesDir)
|
|
45
|
+
isApiOnly(appContext.appDirectory, (_resolvedConfig_source = resolvedConfig.source) === null || _resolvedConfig_source === void 0 ? void 0 : _resolvedConfig_source.entriesDir, appContext.apiDirectory)
|
|
44
46
|
];
|
|
45
47
|
case 1:
|
|
46
48
|
apiOnly = _state.sent();
|
|
@@ -164,15 +166,7 @@ export default function(param) {
|
|
|
164
166
|
htmlTemplates: htmlTemplates
|
|
165
167
|
});
|
|
166
168
|
api.setAppContext(appContext);
|
|
167
|
-
|
|
168
|
-
buildCommands = [
|
|
169
|
-
"dev",
|
|
170
|
-
"start",
|
|
171
|
-
"build",
|
|
172
|
-
"inspect",
|
|
173
|
-
"deploy"
|
|
174
|
-
];
|
|
175
|
-
if (!buildCommands.includes(command))
|
|
169
|
+
if (!checkIsBuildCommands())
|
|
176
170
|
return [
|
|
177
171
|
3,
|
|
178
172
|
14
|
|
@@ -4,7 +4,7 @@ import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
|
4
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
5
5
|
import fs from "fs";
|
|
6
6
|
import path from "path";
|
|
7
|
-
import { isReact18, normalizeToPosixPath, fs as fse } from "@modern-js/utils";
|
|
7
|
+
import { isReact18, normalizeToPosixPath, fs as fse, getCommand } from "@modern-js/utils";
|
|
8
8
|
import { transform } from "esbuild";
|
|
9
9
|
import { parse } from "es-module-lexer";
|
|
10
10
|
import { FILE_SYSTEM_ROUTES_FILE_NAME, JS_EXTENSIONS, LOADER_EXPORT_NAME } from "./constants";
|
|
@@ -201,3 +201,14 @@ export var getServerLoadersFile = function(internalDirectory, entryName) {
|
|
|
201
201
|
export var getServerCombinedModueFile = function(internalDirectory, entryName) {
|
|
202
202
|
return path.join(internalDirectory, entryName, "server-loader-combined.js");
|
|
203
203
|
};
|
|
204
|
+
export var checkIsBuildCommands = function() {
|
|
205
|
+
var buildCommands = [
|
|
206
|
+
"dev",
|
|
207
|
+
"start",
|
|
208
|
+
"build",
|
|
209
|
+
"inspect",
|
|
210
|
+
"deploy"
|
|
211
|
+
];
|
|
212
|
+
var command = getCommand();
|
|
213
|
+
return buildCommands.includes(command);
|
|
214
|
+
};
|
|
@@ -20,7 +20,7 @@ export var start = function() {
|
|
|
20
20
|
logger.log(chalk.cyan("Starting the modern server..."));
|
|
21
21
|
return [
|
|
22
22
|
4,
|
|
23
|
-
isApiOnly(appContext.appDirectory, userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.entriesDir)
|
|
23
|
+
isApiOnly(appContext.appDirectory, userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.entriesDir, appContext.apiDirectory)
|
|
24
24
|
];
|
|
25
25
|
case 1:
|
|
26
26
|
apiOnly = _state.sent();
|
package/dist/esm/index.js
CHANGED
|
@@ -297,6 +297,12 @@ export default function() {
|
|
|
297
297
|
],
|
|
298
298
|
setup: function(api) {
|
|
299
299
|
var appContext = api.useAppContext();
|
|
300
|
+
var watchedFiles = [];
|
|
301
|
+
var isWatched = function(fn) {
|
|
302
|
+
return watchedFiles.some(function(ff) {
|
|
303
|
+
return fn.includes(ff);
|
|
304
|
+
});
|
|
305
|
+
};
|
|
300
306
|
api.setAppContext(_object_spread_props(_object_spread({}, appContext), {
|
|
301
307
|
toolsType: "app-tools"
|
|
302
308
|
}));
|
|
@@ -501,14 +507,24 @@ export default function() {
|
|
|
501
507
|
},
|
|
502
508
|
watchFiles: function watchFiles() {
|
|
503
509
|
return _async_to_generator(function() {
|
|
504
|
-
var appContext2, config;
|
|
510
|
+
var appContext2, config, files;
|
|
505
511
|
return _ts_generator(this, function(_state) {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
+
switch (_state.label) {
|
|
513
|
+
case 0:
|
|
514
|
+
appContext2 = api.useAppContext();
|
|
515
|
+
config = api.useResolvedConfigContext();
|
|
516
|
+
return [
|
|
517
|
+
4,
|
|
518
|
+
generateWatchFiles(appContext2, config.source.configDir)
|
|
519
|
+
];
|
|
520
|
+
case 1:
|
|
521
|
+
files = _state.sent();
|
|
522
|
+
watchedFiles = files;
|
|
523
|
+
return [
|
|
524
|
+
2,
|
|
525
|
+
files
|
|
526
|
+
];
|
|
527
|
+
}
|
|
512
528
|
});
|
|
513
529
|
})();
|
|
514
530
|
},
|
|
@@ -516,15 +532,15 @@ export default function() {
|
|
|
516
532
|
// 这里会被 core/initWatcher 监听的文件变动触发,如果是 src 目录下的文件变动,则不做 restart
|
|
517
533
|
function fileChange(e) {
|
|
518
534
|
return _async_to_generator(function() {
|
|
519
|
-
var filename, eventType, appContext2, appDirectory,
|
|
535
|
+
var filename, eventType, appContext2, appDirectory, absolutePath, closeServer;
|
|
520
536
|
return _ts_generator(this, function(_state) {
|
|
521
537
|
switch (_state.label) {
|
|
522
538
|
case 0:
|
|
523
539
|
filename = e.filename, eventType = e.eventType;
|
|
524
540
|
appContext2 = api.useAppContext();
|
|
525
|
-
appDirectory = appContext2.appDirectory
|
|
541
|
+
appDirectory = appContext2.appDirectory;
|
|
526
542
|
absolutePath = path.resolve(appDirectory, filename);
|
|
527
|
-
if (!(
|
|
543
|
+
if (!(isWatched(absolutePath) && (eventType === "change" || eventType === "unlink")))
|
|
528
544
|
return [
|
|
529
545
|
3,
|
|
530
546
|
4
|
package/dist/esm/schema/index.js
CHANGED
|
@@ -144,29 +144,13 @@ var server = {
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
var tools = {
|
|
147
|
-
tailwindcss: {
|
|
148
|
-
type: "object"
|
|
149
|
-
},
|
|
150
|
-
jest: {
|
|
151
|
-
typeof: [
|
|
152
|
-
"object",
|
|
153
|
-
"function"
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
147
|
esbuild: {
|
|
157
148
|
typeof: [
|
|
158
149
|
"object"
|
|
159
150
|
]
|
|
160
151
|
}
|
|
161
152
|
};
|
|
162
|
-
var deploy = {
|
|
163
|
-
microFrontend: {
|
|
164
|
-
type: [
|
|
165
|
-
"boolean",
|
|
166
|
-
"object"
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
};
|
|
153
|
+
var deploy = {};
|
|
170
154
|
var builderPlugins = {
|
|
171
155
|
type: "array"
|
|
172
156
|
};
|
|
@@ -8,6 +8,7 @@ const ensureExtensions = (file) => {
|
|
|
8
8
|
}
|
|
9
9
|
return file;
|
|
10
10
|
};
|
|
11
|
+
const isDirectory = (file) => !path.extname(file);
|
|
11
12
|
const ifAlreadyExists = (entrypoints, checked) => entrypoints.some((entrypoint) => {
|
|
12
13
|
if (ensureExtensions(entrypoint.entry) === ensureExtensions(checked.entry)) {
|
|
13
14
|
checked.entryName = entrypoint.entryName;
|
|
@@ -23,7 +24,7 @@ const ifAlreadyExists = (entrypoints, checked) => entrypoints.some((entrypoint)
|
|
|
23
24
|
});
|
|
24
25
|
export const getBundleEntry = (appContext, config) => {
|
|
25
26
|
const { appDirectory, packageName } = appContext;
|
|
26
|
-
const {
|
|
27
|
+
const { disableDefaultEntries, entries, entriesDir } = config.source;
|
|
27
28
|
const defaults = disableDefaultEntries ? [] : getFileSystemEntry(appContext, config);
|
|
28
29
|
if (entries) {
|
|
29
30
|
Object.keys(entries).forEach((name) => {
|
|
@@ -31,13 +32,13 @@ export const getBundleEntry = (appContext, config) => {
|
|
|
31
32
|
const entrypoint = typeof value === "string" ? {
|
|
32
33
|
entryName: name,
|
|
33
34
|
entry: ensureAbsolutePath(appDirectory, value),
|
|
34
|
-
absoluteEntryDir: path.dirname(ensureAbsolutePath(appDirectory, value)),
|
|
35
|
+
absoluteEntryDir: isDirectory(ensureAbsolutePath(appDirectory, value)) ? ensureAbsolutePath(appDirectory, value) : path.dirname(ensureAbsolutePath(appDirectory, value)),
|
|
35
36
|
isAutoMount: true,
|
|
36
37
|
fileSystemRoutes: fs.statSync(ensureAbsolutePath(appDirectory, value)).isDirectory() ? {} : void 0
|
|
37
38
|
} : {
|
|
38
39
|
entryName: name,
|
|
39
40
|
entry: ensureAbsolutePath(appDirectory, value.entry),
|
|
40
|
-
absoluteEntryDir: path.dirname(ensureAbsolutePath(appDirectory, value.entry)),
|
|
41
|
+
absoluteEntryDir: isDirectory(ensureAbsolutePath(appDirectory, value.entry)) ? ensureAbsolutePath(appDirectory, value.entry) : path.dirname(ensureAbsolutePath(appDirectory, value.entry)),
|
|
41
42
|
isAutoMount: !value.disableMount,
|
|
42
43
|
customBootstrap: value.customBootstrap && ensureAbsolutePath(appDirectory, value.customBootstrap),
|
|
43
44
|
fileSystemRoutes: fs.statSync(ensureAbsolutePath(appDirectory, value.entry)).isDirectory() ? {} : void 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
|
-
import { createDebugger, findExists, fs, isApiOnly, minimist,
|
|
2
|
+
import { createDebugger, findExists, fs, isApiOnly, minimist, isDevCommand, getArgv } from "@modern-js/utils";
|
|
3
3
|
import { cloneDeep } from "@modern-js/utils/lodash";
|
|
4
4
|
import { printInstructions } from "../utils/printInstructions";
|
|
5
5
|
import { generateRoutes } from "../utils/routes";
|
|
@@ -7,7 +7,7 @@ import { emitResolvedConfig } from "../utils/config";
|
|
|
7
7
|
import { getSelectedEntries } from "../utils/getSelectedEntries";
|
|
8
8
|
import { initialNormalizedConfig } from "../config";
|
|
9
9
|
import { createBuilderGenerator } from "../builder";
|
|
10
|
-
import { isPageComponentFile, parseModule, replaceWithAlias } from "./utils";
|
|
10
|
+
import { checkIsBuildCommands, isPageComponentFile, parseModule, replaceWithAlias } from "./utils";
|
|
11
11
|
import { APP_CONFIG_NAME, APP_INIT_EXPORTED, APP_INIT_IMPORTED } from "./constants";
|
|
12
12
|
import { generateIndexCode } from "./generateCode";
|
|
13
13
|
const debug = createDebugger("plugin-analyze");
|
|
@@ -25,10 +25,12 @@ export default ({ bundler }) => {
|
|
|
25
25
|
const resolvedConfig = api.useResolvedConfigContext();
|
|
26
26
|
const hookRunners = api.useHookRunners();
|
|
27
27
|
try {
|
|
28
|
-
|
|
28
|
+
if (checkIsBuildCommands()) {
|
|
29
|
+
fs.emptydirSync(appContext.internalDirectory);
|
|
30
|
+
}
|
|
29
31
|
} catch {
|
|
30
32
|
}
|
|
31
|
-
const apiOnly = await isApiOnly(appContext.appDirectory, (_resolvedConfig_source = resolvedConfig.source) === null || _resolvedConfig_source === void 0 ? void 0 : _resolvedConfig_source.entriesDir);
|
|
33
|
+
const apiOnly = await isApiOnly(appContext.appDirectory, (_resolvedConfig_source = resolvedConfig.source) === null || _resolvedConfig_source === void 0 ? void 0 : _resolvedConfig_source.entriesDir, appContext.apiDirectory);
|
|
32
34
|
await hookRunners.addRuntimeExports();
|
|
33
35
|
if (apiOnly) {
|
|
34
36
|
const { routes: routes2 } = await hookRunners.modifyServerRoutes({
|
|
@@ -90,15 +92,7 @@ export default ({ bundler }) => {
|
|
|
90
92
|
htmlTemplates
|
|
91
93
|
};
|
|
92
94
|
api.setAppContext(appContext);
|
|
93
|
-
|
|
94
|
-
const buildCommands = [
|
|
95
|
-
"dev",
|
|
96
|
-
"start",
|
|
97
|
-
"build",
|
|
98
|
-
"inspect",
|
|
99
|
-
"deploy"
|
|
100
|
-
];
|
|
101
|
-
if (buildCommands.includes(command)) {
|
|
95
|
+
if (checkIsBuildCommands()) {
|
|
102
96
|
const normalizedConfig = api.useResolvedConfigContext();
|
|
103
97
|
const createBuilderForModern = await createBuilderGenerator(bundler);
|
|
104
98
|
const builder = await createBuilderForModern({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { isReact18, normalizeToPosixPath, fs as fse } from "@modern-js/utils";
|
|
3
|
+
import { isReact18, normalizeToPosixPath, fs as fse, getCommand } from "@modern-js/utils";
|
|
4
4
|
import { transform } from "esbuild";
|
|
5
5
|
import { parse } from "es-module-lexer";
|
|
6
6
|
import { FILE_SYSTEM_ROUTES_FILE_NAME, JS_EXTENSIONS, LOADER_EXPORT_NAME } from "./constants";
|
|
@@ -137,3 +137,14 @@ export const getServerLoadersFile = (internalDirectory, entryName) => {
|
|
|
137
137
|
export const getServerCombinedModueFile = (internalDirectory, entryName) => {
|
|
138
138
|
return path.join(internalDirectory, entryName, "server-loader-combined.js");
|
|
139
139
|
};
|
|
140
|
+
export const checkIsBuildCommands = () => {
|
|
141
|
+
const buildCommands = [
|
|
142
|
+
"dev",
|
|
143
|
+
"start",
|
|
144
|
+
"build",
|
|
145
|
+
"inspect",
|
|
146
|
+
"deploy"
|
|
147
|
+
];
|
|
148
|
+
const command = getCommand();
|
|
149
|
+
return buildCommands.includes(command);
|
|
150
|
+
};
|
|
@@ -10,7 +10,7 @@ export const start = async (api) => {
|
|
|
10
10
|
const hookRunners = api.useHookRunners();
|
|
11
11
|
const { appDirectory, port, serverConfigFile } = appContext;
|
|
12
12
|
logger.log(chalk.cyan(`Starting the modern server...`));
|
|
13
|
-
const apiOnly = await isApiOnly(appContext.appDirectory, userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.entriesDir);
|
|
13
|
+
const apiOnly = await isApiOnly(appContext.appDirectory, userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_source = userConfig.source) === null || _userConfig_source === void 0 ? void 0 : _userConfig_source.entriesDir, appContext.apiDirectory);
|
|
14
14
|
const serverInternalPlugins = await getServerInternalPlugins(api);
|
|
15
15
|
const app = await server({
|
|
16
16
|
pwd: appDirectory,
|
package/dist/esm-node/index.js
CHANGED
|
@@ -84,6 +84,12 @@ export default (options = {
|
|
|
84
84
|
],
|
|
85
85
|
setup: (api) => {
|
|
86
86
|
const appContext = api.useAppContext();
|
|
87
|
+
let watchedFiles = [];
|
|
88
|
+
const isWatched = (fn) => {
|
|
89
|
+
return watchedFiles.some((ff) => {
|
|
90
|
+
return fn.includes(ff);
|
|
91
|
+
});
|
|
92
|
+
};
|
|
87
93
|
api.setAppContext({
|
|
88
94
|
...appContext,
|
|
89
95
|
toolsType: "app-tools"
|
|
@@ -144,15 +150,17 @@ export default (options = {
|
|
|
144
150
|
async watchFiles() {
|
|
145
151
|
const appContext2 = api.useAppContext();
|
|
146
152
|
const config = api.useResolvedConfigContext();
|
|
147
|
-
|
|
153
|
+
const files = await generateWatchFiles(appContext2, config.source.configDir);
|
|
154
|
+
watchedFiles = files;
|
|
155
|
+
return files;
|
|
148
156
|
},
|
|
149
157
|
// 这里会被 core/initWatcher 监听的文件变动触发,如果是 src 目录下的文件变动,则不做 restart
|
|
150
158
|
async fileChange(e) {
|
|
151
159
|
const { filename, eventType } = e;
|
|
152
160
|
const appContext2 = api.useAppContext();
|
|
153
|
-
const { appDirectory
|
|
161
|
+
const { appDirectory } = appContext2;
|
|
154
162
|
const absolutePath = path.resolve(appDirectory, filename);
|
|
155
|
-
if (
|
|
163
|
+
if (isWatched(absolutePath) && (eventType === "change" || eventType === "unlink")) {
|
|
156
164
|
const { closeServer } = await import("./utils/createServer");
|
|
157
165
|
await closeServer();
|
|
158
166
|
await restart(api.useHookRunners(), filename);
|
|
@@ -145,29 +145,13 @@ const server = {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
const tools = {
|
|
148
|
-
tailwindcss: {
|
|
149
|
-
type: "object"
|
|
150
|
-
},
|
|
151
|
-
jest: {
|
|
152
|
-
typeof: [
|
|
153
|
-
"object",
|
|
154
|
-
"function"
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
148
|
esbuild: {
|
|
158
149
|
typeof: [
|
|
159
150
|
"object"
|
|
160
151
|
]
|
|
161
152
|
}
|
|
162
153
|
};
|
|
163
|
-
const deploy = {
|
|
164
|
-
microFrontend: {
|
|
165
|
-
type: [
|
|
166
|
-
"boolean",
|
|
167
|
-
"object"
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
};
|
|
154
|
+
const deploy = {};
|
|
171
155
|
const builderPlugins = {
|
|
172
156
|
type: "array"
|
|
173
157
|
};
|
|
@@ -25,4 +25,5 @@ export declare const parseModule: ({
|
|
|
25
25
|
}) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean]>;
|
|
26
26
|
export declare const hasLoader: (filename: string) => Promise<boolean>;
|
|
27
27
|
export declare const getServerLoadersFile: (internalDirectory: string, entryName: string) => string;
|
|
28
|
-
export declare const getServerCombinedModueFile: (internalDirectory: string, entryName: string) => string;
|
|
28
|
+
export declare const getServerCombinedModueFile: (internalDirectory: string, entryName: string) => string;
|
|
29
|
+
export declare const checkIsBuildCommands: () => boolean;
|
|
@@ -9,20 +9,25 @@ export type BuilderToolsConfig = UnwrapBuilderConfig<BuilderConfig, 'tools'> & {
|
|
|
9
9
|
esbuild?: PluginEsbuildOptions;
|
|
10
10
|
};
|
|
11
11
|
export type RsBuilderToolsConfig = UnwrapBuilderConfig<RsBuilderConfig, 'tools'>;
|
|
12
|
-
/**
|
|
13
|
-
* The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
|
|
14
|
-
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
15
|
-
* @requires `tailwindcss` plugin
|
|
16
|
-
*/
|
|
17
12
|
export type Tailwindcss = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
|
|
18
13
|
export interface SharedToolsConfig extends BuilderSharedToolsConfig {
|
|
14
|
+
/**
|
|
15
|
+
* The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
|
|
16
|
+
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
17
|
+
* @requires `tailwindcss` plugin
|
|
18
|
+
*/
|
|
19
19
|
tailwindcss?: Tailwindcss;
|
|
20
|
+
/**
|
|
21
|
+
* The configuration of `tools.jest` is provided by `test` plugin.
|
|
22
|
+
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
23
|
+
* @requires `test` plugin
|
|
24
|
+
*/
|
|
20
25
|
jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
|
|
21
26
|
/**
|
|
22
27
|
* The configuration of `swc` is provided by `swc` plugin.
|
|
23
28
|
* @requires `swc` plugin
|
|
24
29
|
*/
|
|
25
|
-
swc?: PluginSwcOptions
|
|
30
|
+
swc?: PluginSwcOptions<'outer'>;
|
|
26
31
|
}
|
|
27
32
|
export interface ToolsUserConfig extends BuilderToolsConfig, SharedToolsConfig {}
|
|
28
33
|
export interface RsToolsUserConfig extends SharedToolsConfig, RsBuilderToolsConfig {}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.23.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -73,23 +73,23 @@
|
|
|
73
73
|
"esbuild": "0.15.7",
|
|
74
74
|
"rspack-plugin-virtual-module": "0.1.0",
|
|
75
75
|
"@swc/helpers": "0.5.1",
|
|
76
|
-
"@modern-js/builder": "2.
|
|
77
|
-
"@modern-js/builder-plugin-esbuild": "2.
|
|
78
|
-
"@modern-js/builder-plugin-node-polyfill": "2.
|
|
79
|
-
"@modern-js/builder-shared": "2.
|
|
80
|
-
"@modern-js/builder-webpack-provider": "2.
|
|
81
|
-
"@modern-js/core": "2.
|
|
82
|
-
"@modern-js/new-action": "2.
|
|
83
|
-
"@modern-js/node-bundle-require": "2.
|
|
84
|
-
"@modern-js/plugin": "2.
|
|
85
|
-
"@modern-js/plugin-data-loader": "2.
|
|
86
|
-
"@modern-js/plugin-i18n": "2.
|
|
87
|
-
"@modern-js/plugin-lint": "2.
|
|
88
|
-
"@modern-js/prod-server": "2.
|
|
89
|
-
"@modern-js/server": "2.
|
|
90
|
-
"@modern-js/types": "2.
|
|
91
|
-
"@modern-js/upgrade": "2.
|
|
92
|
-
"@modern-js/utils": "2.
|
|
76
|
+
"@modern-js/builder": "2.23.0",
|
|
77
|
+
"@modern-js/builder-plugin-esbuild": "2.23.0",
|
|
78
|
+
"@modern-js/builder-plugin-node-polyfill": "2.23.0",
|
|
79
|
+
"@modern-js/builder-shared": "2.23.0",
|
|
80
|
+
"@modern-js/builder-webpack-provider": "2.23.0",
|
|
81
|
+
"@modern-js/core": "2.23.0",
|
|
82
|
+
"@modern-js/new-action": "2.23.0",
|
|
83
|
+
"@modern-js/node-bundle-require": "2.23.0",
|
|
84
|
+
"@modern-js/plugin": "2.23.0",
|
|
85
|
+
"@modern-js/plugin-data-loader": "2.23.0",
|
|
86
|
+
"@modern-js/plugin-i18n": "2.23.0",
|
|
87
|
+
"@modern-js/plugin-lint": "2.23.0",
|
|
88
|
+
"@modern-js/prod-server": "2.23.0",
|
|
89
|
+
"@modern-js/server": "2.23.0",
|
|
90
|
+
"@modern-js/types": "2.23.0",
|
|
91
|
+
"@modern-js/upgrade": "2.23.0",
|
|
92
|
+
"@modern-js/utils": "2.23.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@types/babel__traverse": "^7.14.2",
|
|
@@ -98,14 +98,14 @@
|
|
|
98
98
|
"jest": "^29",
|
|
99
99
|
"typescript": "^5",
|
|
100
100
|
"webpack": "^5.82.1",
|
|
101
|
-
"@modern-js/builder-
|
|
102
|
-
"@
|
|
103
|
-
"@modern-js/server-core": "2.
|
|
104
|
-
"@scripts/build": "2.
|
|
105
|
-
"@
|
|
101
|
+
"@modern-js/builder-plugin-swc": "2.23.0",
|
|
102
|
+
"@modern-js/builder-rspack-provider": "2.23.0",
|
|
103
|
+
"@modern-js/server-core": "2.23.0",
|
|
104
|
+
"@scripts/build": "2.23.0",
|
|
105
|
+
"@scripts/jest-config": "2.23.0"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"@modern-js/builder-rspack-provider": "^2.
|
|
108
|
+
"@modern-js/builder-rspack-provider": "^2.23.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"@modern-js/builder-rspack-provider": {
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
"sideEffects": false,
|
|
116
116
|
"publishConfig": {
|
|
117
117
|
"registry": "https://registry.npmjs.org/",
|
|
118
|
-
"access": "public"
|
|
118
|
+
"access": "public",
|
|
119
|
+
"provenance": true
|
|
119
120
|
},
|
|
120
121
|
"scripts": {
|
|
121
122
|
"new": "modern-lib new",
|