2018-11-16 22:13:25 +00:00
|
|
|
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
|
|
|
2016-07-27 17:13:08 +00:00
|
|
|
module.exports = {
|
2018-11-16 22:13:25 +00:00
|
|
|
resolve: {
|
|
|
|
extensions: ['.js', '.jsx']
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new HtmlWebPackPlugin({
|
2019-12-06 12:51:20 +00:00
|
|
|
template: './index.html'
|
2018-11-16 22:13:25 +00:00
|
|
|
})
|
|
|
|
],
|
2018-11-16 18:06:14 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2018-11-16 22:13:25 +00:00
|
|
|
test: /\.(js|jsx)$/,
|
2018-11-16 18:06:14 +00:00
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
2018-11-16 22:13:25 +00:00
|
|
|
loader: 'babel-loader'
|
2018-11-16 18:06:14 +00:00
|
|
|
}
|
2018-11-16 22:13:25 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'style-loader'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
loader: 'css-loader',
|
|
|
|
options: {
|
|
|
|
importLoaders: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
loader: 'postcss-loader'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: ['style-loader', 'css-loader']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|svg|woff|woff2)?(\?v=\d+.\d+.\d+)?$/,
|
|
|
|
loader: 'url-loader?limit=25000'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(eot|ttf)$/,
|
|
|
|
loader: 'file-loader'
|
2018-11-16 18:06:14 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|