This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 33 "version" : " 2.8.4" ,
44 "description" : " This is a sample plugin for Obsidian (https://obsidian.md)" ,
55 "main" : " main.js" ,
6+ "type" : " module" ,
67 "scripts" : {
78 "dev" : " rollup --config rollup.config.js -w" ,
89 "build" : " rollup --config rollup.config.js" ,
2425 "@rollup/plugin-node-resolve" : " 15.0.1" ,
2526 "@rollup/plugin-replace" : " 5.0.1" ,
2627 "@rollup/plugin-typescript" : " 9.0.2" ,
28+ "@rollup/plugin-terser" : " 0.1.0" ,
2729 "@testing-library/jest-dom" : " 5.16.5" ,
2830 "@testing-library/react" : " 13.4.0" ,
2931 "@types/jest" : " 29.2.3" ,
4042 "jest" : " 29.3.1" ,
4143 "jest-mock-extended" : " 3.0.1" ,
4244 "obsidian" : " 0.16.3" ,
43- "rollup" : " 2.79.1" ,
44- "rollup-plugin-terser" : " 7.0.2" ,
45+ "rollup" : " 3.3.0" ,
4546 "rollup-plugin-typescript2" : " 0.34.1" ,
4647 "ts-jest" : " 29.0.3" ,
4748 "tslib" : " 2.4.1" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve";
22import commonjs from "@rollup/plugin-commonjs" ;
33import json from "@rollup/plugin-json" ;
44import typescript2 from "rollup-plugin-typescript2" ;
5- import { terser } from 'rollup- plugin-terser' ;
5+ import terser from '@ rollup/ plugin-terser' ;
66import replace from '@rollup/plugin-replace' ;
77
88const isProd = ( process . env . BUILD === 'production' ) ;
@@ -23,6 +23,7 @@ const getRollupPlugins = (tsconfig, ...plugins) =>
2323 nodeResolve ( { browser : true } ) ,
2424 json ( ) ,
2525 commonjs ( ) ,
26+ terser ( ) ,
2627 // This is needed to make work the plugin on mobile
2728 replace ( {
2829 'process.env.NODE_ENV' : JSON . stringify ( isProd ? 'production' : 'development' ) ,
@@ -43,7 +44,7 @@ const PROD_PLUGIN_CONFIG = {
4344 plugins : [
4445 ...getRollupPlugins ( )
4546 , terser ( {
46- ecma : 2018 ,
47+ ecma : 2021 ,
4748 mangle : { toplevel : true } ,
4849 compress : {
4950 module : true ,
You can’t perform that action at this time.
0 commit comments