Created
February 19, 2016 13:41
-
-
Save meze/c3eedc232ac2cda1c09c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var path = require('path'); | |
var webpack = require('webpack'); | |
var project = require('../project.json'); | |
var ROOT_PATH = path.resolve(__dirname); | |
module.exports = { | |
entry: path.resolve('admin', 'index.js'), | |
output: { | |
path: path.resolve(project.webroot), | |
filename: 'bundle.js', | |
publicPath: 'http://localhost:4000/' | |
}, | |
resolve: { | |
extensions: ['', '.js'], | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
loader: 'babel', | |
exclude: /node_modules/, | |
query: { | |
presets: ['es2015'] | |
} | |
}, | |
{ | |
test: /\.less$/, | |
loaders: ["style", "css?root=../wwwroot", "less"] | |
}, | |
{ | |
test: /\.png$/, loader: "file-loader" | |
} | |
] | |
}, | |
devtool: 'source-map', | |
devServer: { | |
host: "0.0.0.0", | |
port: "4000", | |
colors: true, | |
historyApiFallback: true, | |
hot: true, | |
inline: true | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin() | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment