File tree 3 files changed +21
-4
lines changed
3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " @vue/repl" ,
3
3
"version" : " 0.2.3" ,
4
4
"description" : " Vue component for editing Vue components" ,
5
- "main" : " dist/vue-repl.js" ,
5
+ "main" : " dist/ssr-stub.js" ,
6
+ "module" : " dist/vue-repl.js" ,
6
7
"files" : [
7
8
" dist"
8
9
],
9
10
"exports" : {
10
- "." : " ./dist/vue-repl.js" ,
11
+ "." : {
12
+ "import" : " ./dist/vue-repl.js" ,
13
+ "require" : " ./dist/ssr-stub.js"
14
+ },
11
15
"./style.css" : " ./dist/style.css" ,
12
16
"./dist/style.css" : " ./dist/style.css"
13
17
},
Original file line number Diff line number Diff line change
1
+ module . exports = { }
Original file line number Diff line number Diff line change 1
- import { defineConfig } from 'vite'
1
+ import { defineConfig , Plugin } from 'vite'
2
2
import vue from '@vitejs/plugin-vue'
3
3
4
+ const genStub : Plugin = {
5
+ name : 'gen-stub' ,
6
+ apply : 'build' ,
7
+ generateBundle ( ) {
8
+ this . emitFile ( {
9
+ type : 'asset' ,
10
+ fileName : 'ssr-stub.js' ,
11
+ source : `module.exports = {}`
12
+ } )
13
+ }
14
+ }
15
+
4
16
export default defineConfig ( {
5
- plugins : [ vue ( ) ] ,
17
+ plugins : [ vue ( ) , genStub ] ,
6
18
build : {
7
19
minify : false ,
8
20
lib : {
You can’t perform that action at this time.
0 commit comments