Skip to content

Instantly share code, notes, and snippets.

@json2d
Created April 27, 2017 14:52
Show Gist options
  • Save json2d/00365bf3d8c9dcc54912ae9f3e1050b7 to your computer and use it in GitHub Desktop.
Save json2d/00365bf3d8c9dcc54912ae9f3e1050b7 to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
var BUILD_DIR = path.resolve(__dirname, 'src/client/public');
var APP_DIR = path.resolve(__dirname, 'src/client/app');
config = {
entry: APP_DIR + '/index.jsx',
output: {
path: BUILD_DIR,
publicPath: 'public', //relative to devSever.contentBase
filename: 'bundle.js' },
// devtool: 'source-map',
devServer: {
contentBase: "./src/client"
},
module: {
rules: [
{
test: /.jsx?$/,
loader: 'babel-loader',
}
]
},
}
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment