feat(cli): bump Rsbuild v0.2.2 (#12502)

This commit is contained in:
neverland
2023-12-12 21:12:17 +08:00
committed by GitHub
parent 305f742cfa
commit 4040827740
3 changed files with 47 additions and 147 deletions
+4 -4
View File
@@ -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",
+12 -2
View File
@@ -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'),
@@ -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,
},