一切正常,我不得不重新安装npm run-all,现在出现此错误:
Invalid configuration object. Webpack has been initialised using a configuration object
that does not match the API schema.
- configuration.output has an unknown property 'globalObject'.
These properties are valid:
object { auxiliaryComment?, chunkFilename?, crossOriginLoading?, chunkLoadTimeout?, devtoolFallbackModuleFilenameTemplate?, devtoolLineToLine?, devtoolModuleFilenameTemplate?, filename?, hashDigest?, hashDigestLength?,
hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateFunction?, hotUpdateMainFilename?, jsonpFunction?, library?, libraryTarget?, libraryExport?, path?, pathinfo?, publicPath?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandling?, umdNamedDefine? }
我将GlobalObject设置为此,以便工作人员可以通过workerise-loader在Create React App中工作
我正在使用带有以下覆盖的react-app-rewired
module.exports = function override(config, env) {
config.output.globalObject= `self`
return config
}
如何在Webpack中设置globalObject?
答案 0 :(得分:0)
Sccop安装了旧版本的webpack