Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as JavaScript by Rustem-2020 ( 4 years ago )
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyPlugin = require("copy-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
context: path.resolve( __dirname , 'src'),
entry: {
main: './index.js'
},
output:{
path: path.resolve(__dirname , 'dist'),
filename: '[name].bundle.js'
},
resolve:{
extentions:['.js']
},
alias: {
'@' : path.resolve( __dirname , 'src'),
'@core' : path.resolve( __dirname , 'src', 'core')
},
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"sass-loader"
],
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html'
}),
new CopyPlugin({
patterns: [
{
from: path.resolve( __dirname , 'src', 'favicon.ico'),
to: path.resolve( __dirname , 'dist')
}
],
}),
new MiniCssExtractPlugin({
filename: '[name].bundle.css'
})
]
}
Revise this Paste