mirror of
https://github.com/xodio/xod.git
synced 2026-03-10 10:46:52 +01:00
Benefits of a fresher version of React don't need an explanation :) And `react-hot-loader` was not doing anything for us — page was fully reloaded on every change anyway.
28 lines
672 B
JavaScript
28 lines
672 B
JavaScript
const path = require('path');
|
|
const validate = require('webpack-validator');
|
|
const merge = require('webpack-merge');
|
|
|
|
const baseConfig = require('./webpack.config.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.exports = validate(config);
|