tsdown watch mode doesn't track CSS file changes #824
-
|
Hello, Firstly I just want to say how awesome tsdown is! I seem to have ran into a bit of an issue regarding watch mode with CSS files. When I make an update in the .css file, no rebuild is triggered. I have to instead go cmd + s in the .ts file which then triggers the rebuild. Am I doing something wrong? Reproduction steps:
import css from './hello-world.css?inline';
import reset from '../../shared-styles/reset.css?inline';
const resetSheet = new CSSStyleSheet();
resetSheet.replaceSync(`${reset}`);
const componentSheet = new CSSStyleSheet();
componentSheet.replaceSync(`${css}`);
export class HelloWorld extends HTMLElement {
#internals: ElementInternals;
constructor() {
super();
this.attachShadow({ mode: 'open' });
this.#internals = this.attachInternals();
this.shadowRoot!.adoptedStyleSheets = [resetSheet, componentSheet];
}
connectedCallback() {
this.#internals.ariaLabel = 'A label';
this.render();
}
render() {
this.shadowRoot!.innerHTML = `
<div>
<h1>Hello world!</h1>
</div>
`;
}
}
customElements.define('hello-world', HelloWorld);Many thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
jackholden
Mar 12, 2026
Replies: 2 comments
-
|
Thanks for the feedback, but please raise an issue with minimal reproduction. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
An issue was created here. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jackholden
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An issue was created here.