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:
commit
915bea6ddc
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user