Closed htuzel closed 2 years ago
@htuzel Try adding this to your Webpack config.
output: {
globalObject: typeof self !== 'undefined' ? self : 'this',
}
@htuzel Actually, the previous snippet will resolve the error, but SSR may not work, so I don't recommend using it. The snippet below, when added to your Webpack config, will resolve the error and builds bundles that run in any environment, so SSR will work as expected.
output: {
globalObject: 'this',
libraryTarget: 'umd',
},
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
I am getting this error on laravel logs:
var chunkLoadingGlobal = self[\"webpackChunk\"] = self[\"webpackChunk\"] || [];
ReferenceError: self is not defined