File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2525 < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/quill-table-up@latest/dist/table-creator.css " />
2626 < script src ="https://cdn.jsdelivr.net/gh/quill-modules/quill-easy-color@gh-pages/index.umd.js "> </ script >
2727 < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/gh/quill-modules/quill-easy-color@gh-pages/index.css " />
28- < script src ="./dev .js "> </ script >
28+ < script src ="./index.umd .js "> </ script >
2929 < link rel ="stylesheet " href ="./index.css " />
3030 < style >
3131 .main {
Original file line number Diff line number Diff line change @@ -33,16 +33,20 @@ const buildDts = async () => {
3333 } ) ;
3434} ;
3535const buildTs = async ( isDev : boolean = false ) => {
36- const plugins = [ typescript ( { tsconfig : './tsconfig.json' } ) , nodeResolve ( ) , terser ( ) ] ;
36+ const plugins = [
37+ typescript ( { tsconfig : './tsconfig.json' } ) ,
38+ nodeResolve ( ) ,
39+ ] ;
40+ ! isDev && plugins . push ( terser ( ) ) ;
3741 const bundle = await rollup ( {
3842 input : './src/index.ts' ,
3943 external : [ 'quill' ] ,
4044 treeshake : true ,
4145 plugins,
4246 } ) ;
43- if ( isDev ) {
47+ if ( ! isDev ) {
4448 await bundle . write ( {
45- file : resolve ( demoBundle , 'dev .js' ) ,
49+ file : resolve ( distBundle , 'index.umd .js' ) ,
4650 sourcemap : true ,
4751 format : 'umd' ,
4852 name : 'QuillShortcutKey' ,
@@ -54,7 +58,7 @@ const buildTs = async (isDev: boolean = false) => {
5458 }
5559
5660 await bundle . write ( {
57- file : resolve ( distBundle , 'index.umd.js' ) ,
61+ file : resolve ( demoBundle , 'index.umd.js' ) ,
5862 sourcemap : true ,
5963 format : 'umd' ,
6064 name : 'QuillShortcutKey' ,
You can’t perform that action at this time.
0 commit comments