1
1
mirror of https://github.com/c8r/x0.git synced 2024-08-16 17:00:24 +03:00

Merge pull request #66 from c8r/webpack-hot-client-alias

Remove webpack-hot-client alias
This commit is contained in:
John Otander 2018-06-13 18:03:25 -06:00 committed by GitHub
commit 915bea6ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
const fs = require('fs')
const path = require('path')
const webpack = require('webpack')
const serve = require('webpack-serve')
@ -35,6 +36,12 @@ module.exports = async (opts) => {
path.join(opts.dirname, 'node_modules')
)
const whcAlias = config.resolve.alias['webpack-hot-client/client']
if (!fs.existsSync(whcAlias)) {
const whcPath = 'node_modules/webpack-hot-client/client'
config.resolve.alias['webpack-hot-client/client'] = path.join(process.cwd(), whcPath)
}
config.plugins.push(
new webpack.DefinePlugin({
DEV: JSON.stringify(true),