Skip to content

Commit

Permalink
chore: 引入 semi
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyurus committed Aug 17, 2024
1 parent 2ffbedf commit 5bd37ce
Show file tree
Hide file tree
Showing 4 changed files with 1,568 additions and 3 deletions.
10 changes: 10 additions & 0 deletions modern.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { bffPlugin } from '@modern-js/plugin-bff';
import { koaPlugin } from '@modern-js/plugin-koa';
import { polyfillPlugin } from '@modern-js/plugin-polyfill';
import { tailwindcssPlugin } from '@modern-js/plugin-tailwindcss';
import { SemiRspackPlugin } from '@douyinfe/semi-rspack-plugin';

// https://modernjs.dev/en/configure/app/usage
export default defineConfig({
Expand All @@ -18,4 +19,13 @@ export default defineConfig({
polyfillPlugin(),
tailwindcssPlugin(),
],
tools: {
rspack(config, context) {
context.appendPlugins([
new SemiRspackPlugin({
cssLayer: true,
}),
]);
},
},
});
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dist/"
],
"dependencies": {
"@douyinfe/semi-ui": "^2.64.0",
"@modern-js/plugin-bff": "^2.58.1",
"@modern-js/plugin-koa": "^2.58.1",
"@modern-js/plugin-polyfill": "2.58.1",
Expand All @@ -36,12 +37,13 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@douyinfe/semi-rspack-plugin": "^2.64.0",
"@modern-js-app/eslint-config": "^2.58.1",
"@modern-js/app-tools": "^2.58.1",
"@modern-js/eslint-config": "^2.58.1",
"@modern-js/tsconfig": "^2.58.1",
"@modern-js-app/eslint-config": "^2.58.1",
"@types/koa": "^2.15.0",
"@types/jest": "^29.5.12",
"@types/koa": "^2.15.0",
"@types/node": "^22.4.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
Expand Down
Loading

0 comments on commit 5bd37ce

Please sign in to comment.