Created
May 23, 2020 06:39
-
-
Save flushpot1125/15c955552234ab56247cd10fd09536fe 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
//Ref :https://qiita.com/riversun/items/d27f6d3ab7aaa119deab | |
const path = require("path"); | |
module.exports = { | |
mode: 'development', | |
entry: {app: './src/index.js'}, | |
output: { | |
path: path.join(__dirname, "./"), | |
filename: '[name].js',//[name]の部分にはentryで指定したキー(app)が入る | |
}, | |
devtool: 'inline-source-map',//ブラウザでのデバッグ用にソースマップを出力する | |
//webpack-dev-server用設定 | |
devServer: { | |
open: false,//true:ブラウザを自動で開く | |
openPage: "index.html",//自動で指定したページを開く | |
contentBase: path.join(__dirname, './'),// HTML等コンテンツのルートディレクトリ | |
watchContentBase: true, | |
port: 4000, // ポート番号 | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment