Skip to content

Commit ae31492

Browse files
denihsAkryum
andauthored
fix: Remove fibers from vue compiler (#436)
Co-authored-by: Guillaume Chau <[email protected]>
1 parent 97bc73a commit ae31492

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/vue-component/plugin/dev-server.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ if (isDevelopment()) {
7777
socket.emit('css', io.__styles[hash])
7878
}
7979
})
80-
81-
const binding = getMeteorBinding()
80+
const binding = getMeteorBinding.call(this)
8281
PORT = parseInt(process.env.HMR_PORT) || parseInt(process.env.VUE_DEV_SERVER_PORT) || binding.port + 3 || 3003
8382
INTERFACE = binding.networkInterface
8483

packages/vue-component/plugin/vue-compiler.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import fs from 'fs'
2-
import Future from 'fibers/future'
32
import async from 'async'
43
import { Meteor } from 'meteor/meteor'
54
import _ from 'lodash'
@@ -30,14 +29,16 @@ VueComponentCompiler = class VueCompo extends CachingCompiler {
3029
})
3130
}
3231

33-
processFilesForTarget (inputFiles) {
32+
async processFilesForTarget (inputFiles) {
3433
const cacheMisses = []
3534

3635
this.updateIgnoredConfig(inputFiles)
3736

3837
// console.log(`Found ${inputFiles.length} files.`)
3938

40-
const future = new Future()
39+
let resolver
40+
const promise = new Promise(r => resolver = r)
41+
4142
async.eachLimit(inputFiles, this._maxParallelism, (inputFile, cb) => {
4243
if (!this.isIgnored(inputFile)) {
4344
let error = null
@@ -76,8 +77,9 @@ VueComponentCompiler = class VueCompo extends CachingCompiler {
7677
} else {
7778
cb()
7879
}
79-
}, future.resolver())
80-
future.wait()
80+
}, resolver)
81+
82+
await promise
8183

8284
if (this._cacheDebugEnabled) {
8385
cacheMisses.sort()

0 commit comments

Comments
 (0)