chore: Remove terser from rollup config
This commit is contained in:
parent
c0e61756cb
commit
68854b0e66
157 changed files with 492 additions and 584 deletions
|
@ -28,9 +28,12 @@
|
|||
"react-intl": "^5.18.0",
|
||||
"react-scripts": "^4.0.3",
|
||||
"file-saver": "^2.0.5",
|
||||
"react-markdown": "6.0.2"
|
||||
"react-markdown": "6.0.2",
|
||||
"source-map-explorer": "^2.5.2"
|
||||
},
|
||||
"scripts": {
|
||||
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
||||
"size": "source-map-explorer 'build/static/js/*.js' --tsv --no-root",
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
"webpack": "^5.37.0",
|
||||
"rollup": "^2.50.6",
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"@rollup/plugin-commonjs": "^19.0.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import json from '@rollup/plugin-json'
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
||||
import { name, version, description, author, license, main, module, rollup } from './package.json'
|
||||
|
||||
const banner = `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
const output = [
|
||||
{
|
||||
banner
|
||||
file: main,
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
exports: rollup.exports
|
||||
exports: rollup.exports,
|
||||
}
|
||||
]
|
||||
if (typeof module !== 'undefined')
|
||||
output.push({
|
||||
banner
|
||||
file: module,
|
||||
format: 'es',
|
||||
sourcemap: true
|
||||
|
@ -28,10 +30,5 @@ export default {
|
|||
resolve({ modulesOnly: true }),
|
||||
commonjs(),
|
||||
json(),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue