Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created May 23, 2020 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/15c955552234ab56247cd10fd09536fe to your computer and use it in GitHub Desktop.
Save flushpot1125/15c955552234ab56247cd10fd09536fe to your computer and use it in GitHub Desktop.
//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