File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,16 @@ export default defineConfig(({ mode }) => {
7
7
console . log ( 'mode' , mode )
8
8
const config = {
9
9
plugins : [ react ( ) ] ,
10
- build : {
10
+ }
11
+ if ( mode === 'production' ) {
12
+ config . build = {
13
+ lib : {
14
+ // Could also be a dictionary or array of multiple entry points
15
+ entry : resolve ( __dirname , 'src/MindElixirReact.jsx' ) ,
16
+ name : 'MindElixirReact' ,
17
+ // the proper extensions will be added
18
+ fileName : 'mind-elixir-react' ,
19
+ } ,
11
20
rollupOptions : {
12
21
// make sure to externalize deps that shouldn't be bundled
13
22
// into your library
@@ -18,15 +27,6 @@ export default defineConfig(({ mode }) => {
18
27
globals : { } ,
19
28
} ,
20
29
} ,
21
- } ,
22
- }
23
- if ( mode === 'production' ) {
24
- config . build . lib = {
25
- // Could also be a dictionary or array of multiple entry points
26
- entry : resolve ( __dirname , 'src/MindElixirReact.jsx' ) ,
27
- name : 'MindElixirReact' ,
28
- // the proper extensions will be added
29
- fileName : 'mind-elixir-react' ,
30
30
}
31
31
}
32
32
return config
You can’t perform that action at this time.
0 commit comments