filename: "[name].js"
},
module: {
rules: [
{
test: /\.js$/, // which file needs to be read
// exclude: /node_modules/, // which folder needs not to be read
// exclude: /node_modules\/(?!(MY-MODULE|ANOTHER-ONE)\/).*/,
exclude: /node_modules\/(?!(ngivr)).*/,
loader: ['babel-loader'] // which transplier/compiler/plugin to compile files
},
{
test: /\.less$/,
use: [{
loader: 'style-loader' // creates style nodes from JS strings
}, {
loader: 'css-loader' // translates CSS into CommonJS
}, {
loader: 'less-loader' // compiles Less to CSS
}],
},
{
test: /\.html$/,
use: [{
loader: 'html-loader',
options: {
minimize: mode,
caseSensitive: true
}
}]
},
{
test: /\.(png|jpe?g|gif|ico)$/,
use: fileLoader
},
{
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
use: fileLoader
}, {
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
use: fileLoader
}, {
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
use: fileLoader
}, {
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
use: fileLoader
}, {
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
use: fileLoader
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
{
loader: 'css-loader',
options: {
minimize: minimize,
sourceMap: true
},
}]
})
}
]
},
optimization: {
minimize: minimize,
minimizer: minimizer
},
plugins: plugins,
mode: mode,
}