forked from BobsonLin/custom-bootstrap4
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.
35 lines
738 B
JavaScript
35 lines
738 B
JavaScript
const path = require('path');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: './src/main.js',
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'js/[name].js',
|
|
},
|
|
resolve: {
|
|
modules: ['node_modules'],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(sa|sc|c)ss$/,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
"css-loader",
|
|
"sass-loader"
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new MiniCssExtractPlugin({
|
|
filename: 'css/[name].css',
|
|
}),
|
|
new HtmlWebpackPlugin({
|
|
template: './src/index.html',
|
|
filename: 'index.html',
|
|
}),
|
|
],
|
|
}; |