chore: Remove terser from rollup config
This commit is contained in:
parent
c0e61756cb
commit
68854b0e66
157 changed files with 492 additions and 584 deletions
|
@ -1,6 +1,13 @@
|
|||
# Change log for: @freesewing/components
|
||||
|
||||
|
||||
## 2.16.3 (NaN-NaN-NaN)
|
||||
|
||||
### Changed
|
||||
|
||||
- Caption should not be passed as children to Legend and Example components See https://github.com/freesewing/freesewing/issues/1043
|
||||
- Changed antman references to antperson
|
||||
|
||||
## 2.16.2 (2021-05-05)
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -2,15 +2,17 @@ import babel from '@rollup/plugin-babel'
|
|||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import json from '@rollup/plugin-json'
|
||||
import sass from 'rollup-plugin-sass';
|
||||
import { terser } from 'rollup-plugin-terser'
|
||||
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
|
||||
import { name, version, description, author, license } from './package.json'
|
||||
import components from './src/index.js'
|
||||
|
||||
const banner = `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
|
||||
const createConfig = (component, module) => {
|
||||
return {
|
||||
input: `./src/${component + '/'}index.js`,
|
||||
output: {
|
||||
banner,
|
||||
file: `./${component}/index` + (module ? '.mjs' : '.js'),
|
||||
format: module ? 'es' : 'cjs',
|
||||
sourcemap: true,
|
||||
|
@ -25,11 +27,6 @@ const createConfig = (component, module) => {
|
|||
resolve({ modulesOnly: true }),
|
||||
json(),
|
||||
sass(),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +37,7 @@ let dev = false
|
|||
let only = ['Workbench']
|
||||
for (let component of components) {
|
||||
if (!dev || only.indexOf(component) !== -1) config.push(createConfig(component, false))
|
||||
// Webpack doesn't handle .mjs very well. See #1079
|
||||
// Using .mjs causes problems. See #1079
|
||||
//config.push(createConfig(component, true));
|
||||
}
|
||||
export default config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue