Skip to content

Instantly share code, notes, and snippets.

@blkcatman
Last active June 16, 2019 07:24
Show Gist options
  • Save blkcatman/c702e741ed61ee3ef07c732d618c5b9b to your computer and use it in GitHub Desktop.
Save blkcatman/c702e741ed61ee3ef07c732d618c5b9b to your computer and use it in GitHub Desktop.
webpackコンフィグファイル
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