Last active
June 16, 2019 07:24
-
-
Save blkcatman/c702e741ed61ee3ef07c732d618c5b9b to your computer and use it in GitHub Desktop.
webpackコンフィグファイル
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const config = { | |
entry: { | |
app: ['./index.js'], | |
}, | |
output: { | |
path: path.resolve((__dirname, 'dist')), | |
filename: 'bundle.js', | |
}, | |
devtool: 'source-map', | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: [{ | |
loader: 'babel-loader', | |
options: { babelrc: true }, | |
}], | |
}, | |
], | |
}, | |
optimization: { | |
}, | |
devServer: { | |
contentBase: path.resolve(__dirname, 'public'), | |
watchContentBase: true, | |
host: '0.0.0.0', | |
port: 8000, | |
https: false | |
}, | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment