d72b2d6e36
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
18 lines
366 B
JavaScript
18 lines
366 B
JavaScript
module.exports = {
|
|
webpack: (config, { isServer }) => {
|
|
config.module.rules.unshift({
|
|
test: /\.worker\.(js|ts|tsx)$/,
|
|
loader: 'worker-loader',
|
|
options: {
|
|
filename: 'static/[hash].worker.js',
|
|
publicPath: '/_next/',
|
|
},
|
|
})
|
|
|
|
if (!isServer) {
|
|
config.output.globalObject = 'self'
|
|
}
|
|
|
|
return config
|
|
},
|
|
}
|