Skip to content

Instantly share code, notes, and snippets.

@nweldev
Created March 3, 2019 10:45
Show Gist options
  • Save nweldev/e5b3d2ff9e61e93f2ce0fecbc8325a64 to your computer and use it in GitHub Desktop.
Save nweldev/e5b3d2ff9e61e93f2ce0fecbc8325a64 to your computer and use it in GitHub Desktop.
LitElement ESM build 1/2 - rewrite lit-element module specifier
export default {
input: 'src/hello-element.js',
// exclude lit-element dependency
external: ['lit-element'],
output: {
file: `lib/hello-element.esm.js`,
// keep ES Module format
format: 'es',
// rewrite bare module specifier to a relative path
paths: {
'lit-element': './lit-element.js'
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment