Created
June 16, 2019 23:07
-
-
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
This file contains hidden or 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
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