File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { defineConfig } from '@rsbuild/core'
2
+ import { pluginVue } from '@rsbuild/plugin-vue'
3
+ import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill'
4
+ import pkg from './package.json'
5
+
6
+ export default defineConfig ( {
7
+ tools : {
8
+ htmlPlugin : false ,
9
+ } ,
10
+ plugins : [ pluginNodePolyfill ( ) , pluginVue ( ) ] ,
11
+ output : {
12
+ filenameHash : false ,
13
+ distPath : {
14
+ js : '' ,
15
+ css : '' ,
16
+ } ,
17
+ } ,
18
+ environments : {
19
+ web : {
20
+ resolve : {
21
+ extensions : [ '.vue' , '.js' , '.css' ] ,
22
+ } ,
23
+ source : {
24
+ entry : {
25
+ index : './src/components/index.js' ,
26
+ } ,
27
+ define : {
28
+ 'process.env.NODE_ENV' : JSON . stringify ( process . env . NODE_ENV ) ,
29
+ } ,
30
+ } ,
31
+ output : {
32
+ target : 'web' ,
33
+ filename : {
34
+ js : pkg . browser ,
35
+ css : pkg . style ,
36
+ } ,
37
+ externals : [ 'vue' ] ,
38
+ } ,
39
+ } ,
40
+ node : {
41
+ plugins : [ pluginVue ( ) ] ,
42
+ resolve : {
43
+ extensions : [ '.vue' , '.js' ] ,
44
+ } ,
45
+ source : {
46
+ entry : {
47
+ index : './src/components/index.js' ,
48
+ } ,
49
+ } ,
50
+ output : {
51
+ target : 'node' ,
52
+ filename : {
53
+ js : pkg . module ,
54
+ } ,
55
+ } ,
56
+ } ,
57
+ } ,
58
+ } )
You can’t perform that action at this time.
0 commit comments