You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
739 B
JavaScript
42 lines
739 B
JavaScript
const path = require('path');
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: './src/main.js',
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/i,
|
|
use: ['style-loader', 'css-loader'],
|
|
},
|
|
{
|
|
test: /\.(png|svg|jpg|gif)$/i,
|
|
use: {
|
|
loader: 'url-loader',
|
|
options: {
|
|
name: './dist/images/icon/[name].[ext]'
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.(eot|woff|woff2|ttf)$/i,
|
|
use: {
|
|
loader: 'url-loader',
|
|
options: {
|
|
name: './dist/webfonts/[name].[ext]'
|
|
}
|
|
}
|
|
}
|
|
],
|
|
},
|
|
devServer: {
|
|
contentBase: __dirname + '/dist',
|
|
publicPath: '/',
|
|
watchContentBase: true,
|
|
open: true
|
|
}
|
|
};
|