webpack/test/statsCases/exclude-with-loader/webpack.config.js

29 lines
465 B
JavaScript
Raw Normal View History

/** @type {import("../../../").Configuration} */
module.exports = {
mode: "production",
entry: "./index",
output: {
filename: "bundle.js"
},
stats: {
2018-02-25 09:00:20 +08:00
excludeModules: ["node_modules", "exclude"],
excludeAssets: [/\.json/]
},
module: {
2018-02-25 09:00:20 +08:00
rules: [
{
test: /\.txt/,
loader: "raw-loader"
},
{
test: /\.json/,
loader: "file-loader",
2021-10-29 20:50:39 +08:00
options: {
name: "[sha256:hash:8].[ext]"
},
2018-02-25 09:00:20 +08:00
type: "javascript/auto"
}
]
}
};