From c327e5ee28302e67770feb663b4ef8935eb63fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Thu, 23 Mar 2023 14:05:25 +0800 Subject: [PATCH] fix: remove rollup-plugin-sourcemaps it does not support rollup v3 yet. refs: https://github.com/maxdavidson/rollup-plugin-sourcemaps/issues/127 --- package.json | 1 - src/createRollupConfig.ts | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 18111b34f..ec0d634a4 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,6 @@ "rollup": "^3.20.0", "rollup-plugin-delete": "^2.0.0", "rollup-plugin-dts": "^5.3.0", - "rollup-plugin-sourcemaps": "^0.6.3", "rollup-plugin-typescript2": "^0.34.1", "sade": "^1.8.1", "semver": "^7.3.8", diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index 2f319042b..9dcab77f9 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -9,7 +9,7 @@ import replace from '@rollup/plugin-replace'; import resolve, { DEFAULTS as RESOLVE_DEFAULTS, } from '@rollup/plugin-node-resolve'; -import sourceMaps from 'rollup-plugin-sourcemaps'; +// import sourceMaps from 'rollup-plugin-sourcemaps'; import typescript from 'rollup-plugin-typescript2'; import ts from 'typescript'; import path from 'path'; @@ -207,7 +207,9 @@ export async function createRollupConfig( 'process.env.NODE_ENV': JSON.stringify(opts.env), preventAssignment: true, }), - sourceMaps(), + // removed as it does not support rollup v3 yet. + // TODO: we could move to babel's inputSourceMap option(as it is supported in its readme) + // sourceMaps(), shouldMinify && terser({ output: { comments: false },