-
Notifications
You must be signed in to change notification settings - Fork 0
devtool
박수정 edited this page Aug 15, 2024
·
1 revision
공식 문서
소스맵 생성 여부와 방법 제어
// webpack.config.js
var path = require("path");
module.exports = {
mode: "production",
entry: "./js/app.js",
output: {
path: path.resolve(__dirname, "build"),
filename: "main.bundle.js",
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
},
],
},
stats: {
colors: true,
},
devtool: "source-map",
};