Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit b51f90a

Browse files
committed
rollup version 3.x
1 parent 5aaac3f commit b51f90a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
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",
@@ -24,6 +25,7 @@
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",
@@ -40,8 +42,7 @@
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",

rollup.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve";
22
import commonjs from "@rollup/plugin-commonjs";
33
import json from "@rollup/plugin-json";
44
import typescript2 from "rollup-plugin-typescript2";
5-
import { terser } from 'rollup-plugin-terser';
5+
import terser from '@rollup/plugin-terser';
66
import replace from '@rollup/plugin-replace';
77

88
const 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,

0 commit comments

Comments
 (0)