forked from storybookjs/storybook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
31 lines (30 loc) · 910 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/polymer-playground-app.html',
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].[chunkhash:8].js',
},
module: {
loaders: [
{
test: /\.html$/,
exclude: require.resolve('./index.html'),
use: [{ loader: 'babel-loader' }, { loader: 'polymer-webpack-loader' }],
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: 'index.html',
}),
new CopyWebpackPlugin([
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') },
{ from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') },
]),
],
devServer: { historyApiFallback: true },
devtool: 'eval-source-map',
};