when webpack packages JS, is there any way to specify that the JS file code is not packaged, that is, what is the original code of the js file after output or something, which is equivalent to just copying the file?
when webpack packages JS, is there any way to specify that the JS file code is not packaged, that is, what is the original code of the js file after output or something, which is equivalent to just copying the file?
you can use exclude
{
module: {
loaders: [{
test: /\.js$/,
loader: 'babel-loader',
include: [
path.resolve(__dirname, "app/src"),
path.resolve(__dirname, "app/test")
],
exclude: /node_modules/
}]
}
}
output: {
filename: "[name] .js"
}