mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Updated Webworker example to work with nuxt.js 2.0 (#3531)
In response to @husayt's [comment](https://github.com/nuxt/nuxt.js/pull/3480#issuecomment-404150387). HMR now works.
This commit is contained in:
parent
cfe1865905
commit
c3e51a05af
@ -37,6 +37,9 @@ module.exports = {
|
||||
})
|
||||
}
|
||||
|
||||
// @see https://github.com/nuxt/nuxt.js/pull/3480#issuecomment-404150387
|
||||
config.output.globalObject = "this"
|
||||
|
||||
if (isClient) { // web workers are only available client-side
|
||||
config.module.rules.push({
|
||||
test: /\.worker\.js$/, // this will pick up all .js files that ends with ".worker.js"
|
||||
|
@ -11,10 +11,13 @@
|
||||
"precommit": "npm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"nuxt": "^1.4.1"
|
||||
"nuxt-edge": "^2.0.0-25523369.7c85202"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^8.2.6",
|
||||
"eslint": "^5.1.0",
|
||||
"eslint-loader": "^2.0.0",
|
||||
"eslint-plugin-vue": "^4.5.0",
|
||||
"worker-loader": "^1.1.1"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user