Skip to content

[BUG] watch mode for code conventions #605

@3cp

Description

@3cp

🐛 Bug Report

Aurelia 2 moved conventions from runtime to compile time. It simplified many things, but introduced a hard-to-resolve issue in development watch mode.

🤔 Expected Behavior

For conventional view, foo.js (or foo.ts) compiled result depends on existence of foo.html.
For conventional style, foo.html compiled result depends on existence of foo.css (or sass/scss/less/styl file).

In dev watch mode, we expect re-compilation on what ever needed.

😯 Current Behavior

But in reality, when user creates foo.js, then creates foo.html, the second creation would not trigger a re-compiling on foo.js. User has to touch foo.js again in order to re-compile it.

The story is same for foo.html and foo.css pair.

In comparison, Aurelia v1 doesn't have this issue, because the js/html pair is handled at runtime, not compile time. (FYI, Aurelia v1 doesn't support the convention of html/css pair)

💁 Possible Solution

Not sure what can be done. Probably need to customise all bundlers' watch mode.
Suggestions are welcome.

🔦 Context

💻 Code Sample

🌍 Your Environment

Update: side note, #842, we might have jest cache issue similar to this one.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions