Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
fix typo :p
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Dec 13, 2020
1 parent 588c57c commit a5281ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,25 @@ const configs = [
],
},
// CJS:
...withMinfy((minfied) => ({
...withMinify((minified) => ({
...defaultConfig,
output: [
{
dir: 'dist',
format: 'cjs',
sourcemap: true,
entryFileNames: minfied ? '[name].cjs.production.min.js' : '[name].cjs.development.js',
entryFileNames: minified ? '[name].cjs.production.min.js' : '[name].cjs.development.js',
},
],
plugins: [
typescript(
minfied
minified
? defaultTsConfig
: { ...defaultTsConfig, declarationDir: 'dist/ts', declaration: true, declarationMap: true }
),
replace({
values: {
'process.env.NODE_ENV': JSON.stringify(minfied ? 'production' : 'development'),
'process.env.NODE_ENV': JSON.stringify(minified ? 'production' : 'development'),
},
}),
babel({
Expand All @@ -87,12 +87,12 @@ const configs = [
presets: [['@babel/preset-env', { targets: { node: true, browsers: ['defaults'] } }]],
plugins: [['@babel/plugin-transform-runtime', { useESModules: false }]],
}),
...(minfied ? [terser({ ...defaultTerserOptions, toplevel: true })] : []),
...(minified ? [terser({ ...defaultTerserOptions, toplevel: true })] : []),
],
})),
];

function withMinfy(build) {
function withMinify(build) {
return [build(false), build(true)];
}

Expand Down

0 comments on commit a5281ea

Please sign in to comment.