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