mirror of
https://github.com/c8r/x0.git
synced 2024-08-16 17:00:24 +03:00
Remove webpack-hot-client alias
Somewhere in the webpack deps and libraries an alias is set for webpack-hot-client. Unfortunately that dependency isn't necessarily where it thinks it is when x0 is used as a library in another package. Related c8r/kit#169
This commit is contained in:
parent
83364cb172
commit
d8b9fe1fc6
@ -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