File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2222 "@storybook/react-vite" : " ^8.0.5" ,
2323 "@storybook/test" : " ^8.0.5" ,
2424 "prop-types" : " ^15.8.1" ,
25- "rollup-plugin-copy " : " ^3.5.0 " ,
25+ "rollup-plugin-terser " : " ^7.0.2 " ,
2626 "storybook" : " ^8.0.5" ,
2727 "vite" : " ^5.2.7"
2828 },
2929 "dependencies" : {
30+ "@rollup/plugin-terser" : " ^0.4.4" ,
3031 "@tinymce/tinymce-react" : " ^5.0.1" ,
3132 "markdown-it" : " ^14.1.0" ,
3233 "tinymce" : " ^7.0.0" ,
Original file line number Diff line number Diff line change 11import { defineConfig } from 'vite'
22import { resolve } from 'path'
3+ import terser from '@rollup/plugin-terser' ;
34
45const outputDir = 'supercode' ;
56
@@ -21,11 +22,23 @@ const SupercodeHotReload = () => {
2122
2223export default defineConfig ( {
2324 build : {
25+ minify : 'terser' ,
2426 lib : {
2527 entry : resolve ( __dirname , 'src/plugin.js' ) ,
2628 formats : [ 'es' ] ,
2729 fileName : 'plugin.min' ,
2830 } ,
31+ rollupOptions : {
32+ plugins : [ terser ( {
33+ format : {
34+ comments : false ,
35+ } ,
36+ mangle : {
37+ keep_classnames : false ,
38+ reserved : [ ] ,
39+ } ,
40+ } ) ] ,
41+ } ,
2942 copyPublicDir : false ,
3043 outDir : outputDir ,
3144 emptyOutDir : false ,
You can’t perform that action at this time.
0 commit comments