2016-12-05 22:11:55 +02:00
|
|
|
// const graphql = require('../../cloudapi-graphql/src/endpoint');
|
|
|
|
const plugins = require('./plugins');
|
|
|
|
const base = require('./base');
|
2017-02-23 19:24:18 +02:00
|
|
|
const paths = require('./paths');
|
|
|
|
|
|
|
|
const {
|
|
|
|
FRONTEND,
|
|
|
|
UI,
|
|
|
|
ESLINT
|
|
|
|
} = paths;
|
2016-10-20 04:14:26 +03:00
|
|
|
|
|
|
|
const devServer = {
|
|
|
|
hot: true,
|
2017-02-07 17:52:24 +02:00
|
|
|
quiet: true,
|
|
|
|
clientLogLevel: 'none',
|
2016-10-20 04:14:26 +03:00
|
|
|
compress: true,
|
|
|
|
lazy: false,
|
2016-12-05 22:11:55 +02:00
|
|
|
publicPath: base.output.publicPath,
|
2016-10-20 04:14:26 +03:00
|
|
|
setup: (app) => {
|
2016-12-05 22:11:55 +02:00
|
|
|
// app.use('/graphql', graphql);
|
2016-10-20 04:14:26 +03:00
|
|
|
},
|
|
|
|
historyApiFallback: {
|
|
|
|
index: './static/index.html'
|
2017-02-07 17:52:24 +02:00
|
|
|
},
|
|
|
|
watchOptions: {
|
|
|
|
ignored: /node_modules/
|
2016-10-20 04:14:26 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-12-05 22:11:55 +02:00
|
|
|
module.exports = Object.assign(base, {
|
2017-02-24 15:27:52 +02:00
|
|
|
devtool: 'eval-source-map',
|
2016-10-20 04:14:26 +03:00
|
|
|
entry: [
|
2017-02-07 17:52:24 +02:00
|
|
|
'react-dev-utils/webpackHotDevClient',
|
2016-12-12 18:27:33 +02:00
|
|
|
base.entry
|
2016-10-20 04:14:26 +03:00
|
|
|
],
|
2017-02-23 19:24:18 +02:00
|
|
|
module: {
|
|
|
|
rules: base.module.rules.concat([{
|
|
|
|
test: /js?$/,
|
|
|
|
enforce: 'pre',
|
|
|
|
use: [{
|
|
|
|
loader: 'eslint-loader',
|
|
|
|
options: {
|
|
|
|
configFile: ESLINT
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
include: [
|
|
|
|
FRONTEND,
|
|
|
|
UI
|
|
|
|
]
|
|
|
|
}])
|
|
|
|
},
|
2016-12-05 22:11:55 +02:00
|
|
|
plugins: base.plugins.concat([
|
2017-02-07 17:52:24 +02:00
|
|
|
plugins['hot-module-replacement'](),
|
2017-02-23 19:24:18 +02:00
|
|
|
plugins['watch-missing-node-modules']()
|
2016-10-20 04:14:26 +03:00
|
|
|
]),
|
2017-02-07 17:52:24 +02:00
|
|
|
node: {
|
|
|
|
fs: 'empty',
|
|
|
|
net: 'empty',
|
|
|
|
tls: 'empty'
|
|
|
|
},
|
|
|
|
performance: {
|
|
|
|
hints: false
|
|
|
|
},
|
2016-10-20 04:14:26 +03:00
|
|
|
devServer
|
|
|
|
});
|