Comments (3)
I think that time-fix-plugin
could be not doing its stuff properly. I added a few console logs:
compiler.watch = function () {
console.log(`[${new Date()}] time-fix-plugin compiler.watch`)
watching = watch.apply(this, arguments)
console.log(`[${new Date()}] time-fix-plugin compiler.watch created watching`)
return watching
}
compiler.hooks.watchRun.tap('time-fix-plugin', () => {
console.log(`[${new Date()}] time-fix-plugin watchRun watchin ${watching && new Date(watching.startTime)}`)
if (watching) {
watching.startTime += this.watchOffset
offsetApplied = true
}
})
and the output is:
❯ ../../bin/cli.js dev|tee /dev/null
>>> writing create app file
>>> writing create app file complete
[Mon Oct 15 2018 17:07:01 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch
[Mon Oct 15 2018 17:07:01 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin watchRun watchin undefined
[5:07:01 PM] Compiling client
[Mon Oct 15 2018 17:07:01 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch created watching
[Mon Oct 15 2018 17:07:01 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch
[Mon Oct 15 2018 17:07:01 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin watchRun watchin undefined
[5:07:01 PM] Compiling server
[Mon Oct 15 2018 17:07:01 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch created watching
(node:4165) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
[5:07:02 PM] Compiled server in 730ms
report-change
[17:7:2] Rebuilding due to changes made in .ream/create-app.js
[5:07:02 PM] Compiled client in 876ms
App running at:
- Local: http://localhost:4000
- Network: http://172.22.10.217:4000
report-change
[17:7:1] Rebuilding due to changes made in .ream/create-app.js
[Mon Oct 15 2018 17:07:02 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin watchRun watchin Mon Oct 15 2018 17:07:02 GMT+0700 (Novosibirsk Standard Time)
[5:07:02 PM] Compiling server
[5:07:02 PM] Compiled server in 28ms
App running at:
- Local: http://localhost:4000
- Network: http://172.22.10.217:4000
[Mon Oct 15 2018 17:07:02 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin watchRun watchin Mon Oct 15 2018 17:07:02 GMT+0700 (Novosibirsk Standard Time)
[5:07:02 PM] Compiling client
[5:07:02 PM] Compiled client in 24ms
App running at:
- Local: http://localhost:4000
- Network: http://172.22.10.217:4000
you can see that during the first watchRun
hook invocation, watching
is still undefined (because watch.apply
has not completed). This probably (?) leads to the false positive.
However it's not not necessary the cause because when I add a 1 second pause to writeCreateAppFile()
, it never rebuilds multiple times:
❯ ../../bin/cli.js dev|tee /dev/null
>>> writing create app file and pausing 1 second
>>> writing create app file complete
[Mon Oct 15 2018 17:12:51 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch
[Mon Oct 15 2018 17:12:51 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin watchRun watchin undefined
[5:12:51 PM] Compiling client
[Mon Oct 15 2018 17:12:51 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch created watching
[Mon Oct 15 2018 17:12:51 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch
[Mon Oct 15 2018 17:12:51 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin watchRun watchin undefined
[5:12:51 PM] Compiling server
[Mon Oct 15 2018 17:12:51 GMT+0700 (Novosibirsk Standard Time)] time-fix-plugin compiler.watch created watching
(node:4554) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
[5:12:52 PM] Compiled server in 696ms
[5:12:52 PM] Compiled client in 818ms
App running at:
- Local: http://localhost:4000
- Network: http://172.22.10.217:4000
@egoist thoughts?
from deprecated.
@egoist please see the suggested fix: egoist/time-fix-plugin#2
I can't say I'm 100% sure in the fix, but it fixes this issue and doesn't break watching. I could be missing something of course.
from deprecated.
🎉 This issue has been resolved in version 3.3.5 🎉
The release is available on:
Your semantic-release bot 📦🚀
from deprecated.
Related Issues (20)
- Default error message (You must create pages/*.vue) is misleading
- How to use i18n in my project HOT 5
- Critical: Ream creates invalid Webpack config object HOT 4
- getInitialData is lost when using Vue.extend HOT 4
- Client-side getInitialData redirect to absolute URL shows new component for a moment HOT 1
- Unexpected token initialDataKey HOT 3
- Client-side getInitialData redirect to relative URL doesn't work HOT 1
- with-apollo example is outdated HOT 1
- Change enhanceApp context API HOT 4
- Vuex example not listing vuex in package.json HOT 5
- how to use postcss
- Disable SSR for some part of code HOT 1
- Ream fails to compile with newest Webpack due to missing uglifyjs HOT 2
- Exception in getInitialDate returns HTTP 200 HOT 1
- Prefetching data with `ssrPrefetch`
- is there any guide for deploy and build? HOT 3
- how to enable babel-polyfill in webpack?
- how to use mqtt in ream for browser?
- In latest webpack, cache is mistakenly reused between server and client builds HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deprecated.