Skip to content

Commit

Permalink
fix: babel support
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed May 20, 2020
1 parent 1bfcd29 commit 5daa802
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions template/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@ const config = {
path: path.resolve(__dirname, './dist'),
filename: '|webPackName|',
},
module: {
rules: [
{
/* Transpile JS from source and Web Component packages in ES6 */
test: /\.js$/,
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules/lit-element'),
path.resolve(__dirname, 'node_modules/lit-html'),
path.resolve(__dirname, 'node_modules/@alaskaairux'),
path.resolve(__dirname, 'node_modules/focus-visible'),
],
use: {
loader: 'babel-loader',
},
},
],
},
optimization: {
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
chunks: 'all',
test: /([\\/]node_modules[\\/])/,
name: 'polyfills',
name: 'polyfills'
},
},
},
Expand Down

0 comments on commit 5daa802

Please sign in to comment.