Skip to content

Instantly share code, notes, and snippets.

@kcmr
Created June 16, 2019 23:07
Show Gist options
  • Save kcmr/413aa8c4191d39cad8a47029fc15554c to your computer and use it in GitHub Desktop.
Save kcmr/413aa8c4191d39cad8a47029fc15554c to your computer and use it in GitHub Desktop.
Rollup config to transpile LitElement without the need to use custom-es5-adapter
import commonjs from 'rollup-plugin-commonjs';
import resolver from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import multiEntry from 'rollup-plugin-multi-entry';
export default {
input: [
require.resolve('regenerator-runtime'),
'src/my-component/component.js'
],
output: {
file: 'dist/bundle.js',
format: 'iife'
},
plugins: [
commonjs(),
resolver(),
multiEntry({
exports: false
}),
babel({
babelrc: false,
presets: [
[
'@babel/env',
{
modules: false,
targets: {
browsers: ['ie 11']
}
}
]
]
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment