Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1731] Webpack: Alloy loader recompiles unchanged components

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterJan Vennemann
AssigneeJan Vennemann
Created2020-06-02T18:12:03.000+0000
Updated2020-06-02T18:12:03.000+0000

Description

The Alloy loader uses [addDependency](https://webpack.js.org/api/loaders/#thisadddependency) to define dependencies of Alloy components. This is used to re-compile a component if it's view or styles changes. However, this can cause unwanted behavior in certain cases: - If a component has no .tss file, it will constantly be recompiled when another component triggers a rebuild. This is because Webpack thinks it needs to recompile it as well, since its style file was missing, and it may have been created in the meantime. - We could check if the style file actually exists before adding it as a dependency to prevent these unwanted rebuilds. But if a user now creates the style file, Webpack won't trigger the recompile for the component because it doesn't now about the dependency. To address this a solution needs to be found that allows to add all dependencies of a component while also preventing unnecessary rebuilds.

Comments

No comments

JSON Source