Update tsdown & use @tsdown/css

This update simplifies the tsdown configuration, we do not need our custom plugin to minify CSS anymore (replaced by `css.minify = true`), and same for our hooks that rename the built CSS (replaced by `css.fileName`) 😍
This commit is contained in:
Hugo Alliaume
2026-03-20 08:33:35 +01:00
parent 581fe67a2a
commit 66b32eaad0
3 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
const eagerControllers = {};
const lazyControllers = {};
const isApplicationDebug = false;
export { eagerControllers, isApplicationDebug, lazyControllers };
export { eagerControllers, isApplicationDebug, lazyControllers };

View File

@@ -1,5 +1,5 @@
import { EagerControllersCollection, LazyControllersCollection } from "./controllers.js";
import { Application } from "@hotwired/stimulus";
import { EagerControllersCollection, LazyControllersCollection } from "./controllers.js";
declare const loadControllers: (application: Application, eagerControllers: EagerControllersCollection, lazyControllers: LazyControllersCollection) => void;
declare const startStimulusApp: () => Application;
export { loadControllers, startStimulusApp };

View File

@@ -1,5 +1,5 @@
import { eagerControllers, isApplicationDebug, lazyControllers } from "./controllers.js";
import { Application } from "@hotwired/stimulus";
import { eagerControllers, isApplicationDebug, lazyControllers } from "./controllers.js";
const controllerAttribute = "data-controller";
const loadControllers = (application, eagerControllers, lazyControllers) => {
for (const name in eagerControllers) registerController(name, eagerControllers[name], application);
@@ -67,4 +67,4 @@ function extractControllerNamesFrom(element) {
function canRegisterController(name, application) {
return !application.router.modulesByIdentifier.has(name);
}
export { loadControllers, startStimulusApp };
export { loadControllers, startStimulusApp };