@fibrae/semi-next 0.3.1 → 0.5.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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/index.mjs +1 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ export default semiNext()({
|
|
|
35
35
|
|
|
36
36
|
Components bring their own styles on demand, so do not import `styles.css`. `semiNext(options)` returns `(nextConfig) => nextConfig`, and on your config it:
|
|
37
37
|
|
|
38
|
-
- Merges `@fibrae/semi-ui-react`, `@fibrae/semi-ai-react`, `@fibrae/semi-icons-react` and `@fibrae/semi-
|
|
38
|
+
- Merges `@fibrae/semi-ui-react`, `@fibrae/semi-ai-react`, `@fibrae/semi-icons-react` and `@fibrae/semi-icons-react/illustrations` into `transpilePackages`. The Pages Router server loads `node_modules` directly with Node, and Node cannot import `.css`.
|
|
39
39
|
- Adds `turbopack.rules`: with `omitCss` or `prefixCls`, it attaches the matching loader to Semi's JS. Your other rules stay. A rule on the same glob as the plugin (`*.js`) throws, so use a different glob.
|
|
40
40
|
- Adds `webpack()`: under `--webpack`, it attaches `SemiWebpackPlugin` according to the options, then calls your original `webpack` function. With no options it attaches no plugin, and Next handles the `.css` imported by components directly.
|
|
41
41
|
|
|
@@ -82,4 +82,4 @@ The Turbopack `*.css` rule does not change the module type, so your own `*.modul
|
|
|
82
82
|
- `pnpm --filter @fibrae/semi-next build`: builds with `vp pack`.
|
|
83
83
|
- `pnpm --filter @fibrae/semi-next test`: builds first, then uses `test/run.ts` to verify the returned `transpilePackages` and `turbopack.rules` (loader paths point at published files, and the `*.css` rule has no `as`, which keeps CSS Modules), when `webpack()` attaches the plugin, and the option checks for `prefixCls` and Turbopack.
|
|
84
84
|
|
|
85
|
-
For general commands, see [CONTRIBUTING.md](
|
|
85
|
+
For general commands, see [CONTRIBUTING.md](../../../CONTRIBUTING.md#常用命令) at the repository root.
|
package/README.zh-CN.md
CHANGED
|
@@ -35,7 +35,7 @@ export default semiNext()({
|
|
|
35
35
|
|
|
36
36
|
组件按需带出自己的样式,不导入 `styles.css`。`semiNext(options)` 返回 `(nextConfig) => nextConfig`,在你的配置上:
|
|
37
37
|
|
|
38
|
-
- 把 `@fibrae/semi-ui-react`、`@fibrae/semi-ai-react`、`@fibrae/semi-icons-react`、`@fibrae/semi-
|
|
38
|
+
- 把 `@fibrae/semi-ui-react`、`@fibrae/semi-ai-react`、`@fibrae/semi-icons-react`、`@fibrae/semi-icons-react/illustrations` 合并进 `transpilePackages`:Pages Router 的服务端用 Node 直接加载 `node_modules`,而 Node 不能导入 `.css`。
|
|
39
39
|
- 加 `turbopack.rules`:`omitCss`、`prefixCls` 时给 Semi 的 JS 挂对应 loader。你已有的其他规则保留;与插件同 glob 的规则(`*.js`)抛错,请改用别的 glob。
|
|
40
40
|
- 加 `webpack()`:`--webpack` 下按选项挂 `SemiWebpackPlugin`,再调用你原有的 `webpack` 函数;不传选项时不挂插件,Next 直接处理组件导入的 `.css`。
|
|
41
41
|
|
|
@@ -82,4 +82,4 @@ Turbopack 的 `*.css` 规则不改变模块类型,应用自己的 `*.module.cs
|
|
|
82
82
|
- `pnpm --filter @fibrae/semi-next build`:`vp pack` 构建。
|
|
83
83
|
- `pnpm --filter @fibrae/semi-next test`:先构建,再用 `test/run.ts` 验证返回的 `transpilePackages`、`turbopack.rules`(loader 路径指向已发布文件,`*.css` 规则不带 `as` 以保留 CSS Modules)、`webpack()` 何时挂插件,以及 `prefixCls` 与 Turbopack 下的选项校验。
|
|
84
84
|
|
|
85
|
-
通用命令见根目录 [CONTRIBUTING.md](
|
|
85
|
+
通用命令见根目录 [CONTRIBUTING.md](../../../CONTRIBUTING.md#常用命令)。
|
package/dist/index.mjs
CHANGED
|
@@ -5,8 +5,7 @@ const require = createRequire(import.meta.url);
|
|
|
5
5
|
const TRANSPILE_PACKAGES = [
|
|
6
6
|
"@fibrae/semi-ui-react",
|
|
7
7
|
"@fibrae/semi-ai-react",
|
|
8
|
-
"@fibrae/semi-icons-react"
|
|
9
|
-
"@fibrae/semi-illustrations-react"
|
|
8
|
+
"@fibrae/semi-icons-react"
|
|
10
9
|
];
|
|
11
10
|
function loader(name) {
|
|
12
11
|
return require.resolve(`@fibrae/semi-webpack-plugin/${name}`);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibrae/semi-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Plugin that support Semi Design Next in Next.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://semi-design-next.pages.dev",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/smile-alive/semi-design-next.git",
|
|
10
|
-
"directory": "packages/semi-next"
|
|
10
|
+
"directory": "packages/plugins/semi-next"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/smile-alive/semi-design-next/issues"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript": "^6.0.3"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@fibrae/semi-webpack-plugin": "0.
|
|
28
|
+
"@fibrae/semi-webpack-plugin": "0.5.0"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "vp pack",
|