Created
January 9, 2022 19:24
-
-
Save mohnatus/56072dbf59da6b7e34b50bb2817b35c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (env={}, argv={}) => { | |
return { | |
devtool: 'source-map', | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
use: "babel-loader" | |
}, | |
{ | |
test: /\.css$/, | |
use: [ | |
'style-loader', | |
'css-loader' | |
] | |
}, | |
{ | |
test: /\.(gif|png|jpe?g|svg)$/i, | |
use: [ | |
'file-loader', | |
{ | |
loader: 'image-webpack-loader', | |
options: { | |
disable: argv.mode === 'development' | |
} | |
} | |
] | |
} | |
], | |
}, | |
plugins: [ | |
argv.mode === "development" | |
? new HtmlWebpackPlugin() | |
: null | |
].filter(plugin => !!plugin) | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment