mirror of
https://github.com/xodio/xod.git
synced 2026-03-19 23:26:57 +01:00
37 lines
788 B
JavaScript
37 lines
788 B
JavaScript
|
|
const path = require('path');
|
|
const validate = require('webpack-validator');
|
|
const merge = require('webpack-merge');
|
|
|
|
const baseConfig = require('./base.js');
|
|
const pkgpath = subpath => path.join(__dirname, '..', subpath);
|
|
|
|
const config = merge.smart(baseConfig, {
|
|
output: {
|
|
publicPath: 'http://localhost:8080/',
|
|
},
|
|
devServer: {
|
|
hot: true,
|
|
host: 'localhost',
|
|
port: 8080,
|
|
contentBase: pkgpath('dist'),
|
|
},
|
|
resolve: {
|
|
modulesDirectories: [
|
|
// search top-level node_modules for webpack-hot-loader
|
|
pkgpath('../../node_modules'),
|
|
],
|
|
extensions: ['', '.js', '.jsx', '.scss'],
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /src\/.*\.jsx?$/,
|
|
loaders: ['react-hot'],
|
|
},
|
|
]
|
|
}
|
|
});
|
|
|
|
module.exports = validate(config);
|