2018-05-23 22:06:49 +03:00
|
|
|
const path = require('path');
|
2018-09-11 08:42:22 +03:00
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
2018-09-29 06:01:46 +03:00
|
|
|
const webpack = require('webpack');
|
2018-05-23 22:06:49 +03:00
|
|
|
|
|
|
|
module.exports = {
|
2018-07-08 09:02:10 +03:00
|
|
|
entry: './index.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
filename: 'index.js',
|
|
|
|
},
|
2018-09-11 08:42:22 +03:00
|
|
|
plugins: [
|
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: "index.html"
|
2018-09-29 06:01:46 +03:00
|
|
|
}),
|
|
|
|
// Have this example work in Edge which doesn't ship `TextEncoder` or
|
|
|
|
// `TextDecoder` at this time.
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
TextDecoder: ['text-encoding', 'TextDecoder'],
|
|
|
|
TextEncoder: ['text-encoding', 'TextEncoder']
|
2018-09-11 08:42:22 +03:00
|
|
|
})
|
|
|
|
],
|
2018-07-08 09:02:10 +03:00
|
|
|
mode: 'development'
|
2018-05-23 22:06:49 +03:00
|
|
|
};
|