Skip to content

Commit

Permalink
feat(polyfills): added babel polyfill config + added build visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanGerbeth authored and MrTelanie committed Oct 26, 2019
1 parent acd28ff commit 9bbd188
Show file tree
Hide file tree
Showing 4 changed files with 4,719 additions and 4,628 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jspm_packages
lib
docs
build
report

# npm package lock
package-lock.json
Expand Down
30 changes: 23 additions & 7 deletions .rolluprc
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import minify from 'rollup-plugin-babel-minify';
import visualizer from 'rollup-plugin-visualizer';

const plugins = [
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [['@babel/preset-env', { modules: false }]]
}),
resolve(),
minify({
comments: false,
Expand Down Expand Up @@ -36,7 +32,13 @@ export default [
exports: 'named',
format: 'amd'
}],
plugins
plugins: [
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [['@babel/preset-env', { modules: false }]]
}),
].concat(plugins)
}, ...[
{
input: 'src/index.js',
Expand Down Expand Up @@ -68,7 +70,21 @@ export default [
exports: 'named',
extend: true
},
plugins
plugins: [
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [['@babel/preset-env', {
targets: 'last 2 versions, ie >= 11',
corejs: '3',
useBuiltIns: 'usage'
}]]
}),
visualizer({
filename: `./report/${item.output.name}.html`,
template: 'treemap'
})
].concat(plugins)
}
})
];
Loading

0 comments on commit 9bbd188

Please sign in to comment.