-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 update config to match upgraded deps
- Loading branch information
Showing
3 changed files
with
33 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
["@babel/preset-env", { | ||
"modules": false | ||
}] | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
import path from 'path' | ||
import babel from 'rollup-plugin-babel' | ||
import babel from '@rollup/plugin-babel' | ||
import minify from 'rollup-plugin-babel-minify' | ||
|
||
const pkg = require(path.resolve(process.cwd(), './package.json')) | ||
|
||
const plugs = [babel()] | ||
const plugins = [babel()] | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
plugs.push( | ||
plugins.push( | ||
minify({ | ||
comments: false, | ||
}) | ||
) | ||
} | ||
|
||
const config = { | ||
entry: './src/hero-patterns.js', | ||
sourceMap: true, | ||
plugins: plugs, | ||
targets: [{ dest: pkg.main, format: 'cjs' }, { dest: pkg.module, format: 'es' }], | ||
export default { | ||
input: './src/hero-patterns.js', | ||
plugins, | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: 'cjs', | ||
sourcemap: true, | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: 'es', | ||
sourcemap: true, | ||
}, | ||
], | ||
} | ||
|
||
export default config |