Skip to content

Commit

Permalink
feat(cli): bump Rsbuild v0.2.2 (#12502)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Dec 12, 2023
1 parent 305f742 commit 4040827
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 147 deletions.
8 changes: 4 additions & 4 deletions packages/vant-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"dependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@rsbuild/core": "0.1.8",
"@rsbuild/plugin-babel": "0.1.8",
"@rsbuild/plugin-vue": "0.1.8",
"@rsbuild/plugin-vue-jsx": "0.1.8",
"@rsbuild/core": "0.2.2",
"@rsbuild/plugin-babel": "0.2.2",
"@rsbuild/plugin-vue": "0.2.2",
"@rsbuild/plugin-vue-jsx": "0.2.2",
"@vant/eslint-config": "workspace:^",
"@vant/touch-emulator": "workspace:^",
"@vitejs/plugin-vue": "^4.0.0",
Expand Down
14 changes: 12 additions & 2 deletions packages/vant-cli/src/compiler/compile-site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ export async function compileSite(isProd = false) {
const assetPrefix = vantConfig.build?.site?.publicPath || '/';

const rsbuildConfig: RsbuildConfig = {
plugins: [pluginBabel(), pluginVue(), pluginVueJsx()],
plugins: [
pluginBabel({
include: /\.(jsx|tsx)$/,
exclude: /[\\/]node_modules[\\/]/,
}),
pluginVue(),
pluginVueJsx(),
],
source: {
entry: {
index: join(SITE_SRC_DIR, 'desktop/main.js'),
Expand All @@ -59,7 +66,10 @@ export async function compileSite(isProd = false) {
output: {
assetPrefix,
// make compilation faster
disableSourceMap: true,
sourceMap: {
js: false,
css: false,
},
distPath: {
root: vantConfig.build?.site?.outputDir || SITE_DIST_DIR,
},
Expand Down
Loading

0 comments on commit 4040827

Please sign in to comment.