Skip to content

Rollup watch does not recompile ES module on change of an imported less dependency dependency #2

@katrotz

Description

@katrotz

Rollup watch does not recompile ES module on change of an imported less dependency dependency.

index.js

import styles from index.less;
// which becomes `var styles = "body {\n  font-size: 12px;\n}"`
// and is not reevaluated when dependencies of the index.less change

index.less

@import-once "dependency.less"

dependency.less

body {
   font-size: 12px;
}

Note: Currently the less-modules plugin inserts fake "imports" in the compiled less to ES module that trigger the rollup-watch to rebuild on less dependency change which works fine for the output css files, but fails to work for less modules imported into ES file.

Depends on the resolution of rollup/rollup#1203

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions