@modern-js/main-doc 0.0.0-nightly-20231203170617 → 0.0.0-nightly-20231205170638
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.
@@ -83,7 +83,7 @@ For example, if you are using pnpm, you can update the Rspack version with `over
|
|
83
83
|
"pnpm": {
|
84
84
|
"overrides": {
|
85
85
|
"@rspack/core": "nightly",
|
86
|
-
"@rspack/
|
86
|
+
"@rspack/plugin-react-refresh": "nightly",
|
87
87
|
"@rspack/plugin-html": "nightly"
|
88
88
|
}
|
89
89
|
}
|
@@ -209,7 +209,7 @@ Solution:
|
|
209
209
|
|
210
210
|
If the compilation is succeed, but the `exports is not defined` error appears after opening the page, it is usually because a CommonJS module is compiled by Babel.
|
211
211
|
|
212
|
-
Under normal circumstances, Modern.js will not use Babel to compile CommonJS modules. If the [source.include](/en/configure/app/source/include.html) configuration option is used in the project,
|
212
|
+
Under normal circumstances, Modern.js will not use Babel to compile CommonJS modules. If the [source.include](/en/configure/app/source/include.html) configuration option is used in the project, some CommonJS modules may be added to the Babel compilation.
|
213
213
|
|
214
214
|
There are two workarounds for this problem:
|
215
215
|
|
@@ -83,7 +83,7 @@ import RspackPrecautions from '@modern-js/builder-doc/docs/zh/shared/rspackPreca
|
|
83
83
|
"pnpm": {
|
84
84
|
"overrides": {
|
85
85
|
"@rspack/core": "nightly",
|
86
|
-
"@rspack/
|
86
|
+
"@rspack/plugin-react-refresh": "nightly",
|
87
87
|
"@rspack/plugin-html": "nightly"
|
88
88
|
}
|
89
89
|
}
|
@@ -209,7 +209,7 @@ npm ls postcss
|
|
209
209
|
|
210
210
|
如果编译正常,但是打开页面后出现 `exports is not defined` 报错,通常是因为在项目中使用 Babel 编译了一个 CommonJS 模块,导致 Babel 出现异常。
|
211
211
|
|
212
|
-
在正常情况下,Modern.js 是不会使用 Babel 来编译 CommonJS 模块的。如果项目中使用了 [source.include](/configure/app/source/include.html)
|
212
|
+
在正常情况下,Modern.js 是不会使用 Babel 来编译 CommonJS 模块的。如果项目中使用了 [source.include](/configure/app/source/include.html) 配置项,则可能会把一些 CommonJS 模块加入到 Babel 编译中。
|
213
213
|
|
214
214
|
该问题有两种解决方法:
|
215
215
|
|
package/package.json
CHANGED
@@ -15,17 +15,17 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "0.0.0-nightly-
|
18
|
+
"version": "0.0.0-nightly-20231205170638",
|
19
19
|
"publishConfig": {
|
20
20
|
"registry": "https://registry.npmjs.org/",
|
21
21
|
"access": "public",
|
22
22
|
"provenance": true
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@modern-js/sandpack-react": "0.0.0-nightly-
|
25
|
+
"@modern-js/sandpack-react": "0.0.0-nightly-20231205170638"
|
26
26
|
},
|
27
27
|
"peerDependencies": {
|
28
|
-
"@modern-js/builder-doc": "0.0.0-nightly-
|
28
|
+
"@modern-js/builder-doc": "0.0.0-nightly-20231205170638"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"classnames": "^2",
|
@@ -39,8 +39,8 @@
|
|
39
39
|
"@rspress/shared": "1.7.4",
|
40
40
|
"@types/node": "^16",
|
41
41
|
"@types/fs-extra": "9.0.13",
|
42
|
-
"@modern-js/builder-doc": "0.0.0-nightly-
|
43
|
-
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-nightly-
|
42
|
+
"@modern-js/builder-doc": "0.0.0-nightly-20231205170638",
|
43
|
+
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-nightly-20231205170638"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"dev": "rspress dev",
|