Skip to content

Commit 8c4d9e2

Browse files
committed
reproduce the bug
1 parent a258966 commit 8c4d9e2

File tree

5 files changed

+449
-23
lines changed

5 files changed

+449
-23
lines changed

Diff for: package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"build": "node build/build.js"
1111
},
1212
"dependencies": {
13-
"vue": "^2.5.2"
13+
"node-sass": "^4.7.2",
14+
"sass-loader": "^6.0.6",
15+
"vue": "^2.5.2",
16+
"worker-loader": "^1.1.0"
1417
},
1518
"devDependencies": {
1619
"autoprefixer": "^7.1.2",

Diff for: src/App.vue

+10
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,19 @@
77

88
<script>
99
import HelloWorld from './components/HelloWorld'
10+
import { SOME_CONSTANT } from './assets/test.scss'
11+
import TestWorker from 'worker-loader!./assets/test.worker.js'
1012
1113
export default {
1214
name: 'App',
15+
mounted () {
16+
console.log('The value of the constant is', SOME_CONSTANT)
17+
},
18+
data () {
19+
return {
20+
worker: new TestWorker()
21+
}
22+
},
1323
components: {
1424
HelloWorld
1525
}

Diff for: src/assets/test.scss

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$SOME_CONSTANT: 1px;
2+
3+
:export {
4+
SOME_CONSTANT: $SOME_CONSTANT;
5+
}
6+

Diff for: src/assets/test.worker.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { SOME_CONSTANT } from './test.scss'
2+
3+
console.log('This is a webworker! I\'ll do calculation with the constants defined in styles.')
4+

0 commit comments

Comments
 (0)