feat: migrate Slider with native range semantics and strict ESM declarations

This commit is contained in:
maoyingjie
2026-10-23 13:12:26 +08:00
parent b1cb00deba
commit 4da45b109e
40 changed files with 2239 additions and 3 deletions
+18
View File
@@ -9,6 +9,24 @@ export default defineConfig({
include: ["src"],
entryRoot: "src",
aliasesExclude: ["@heroui-vue/styles"],
// ESM consumers using NodeNext require extensions even in declarations.
// Foo.vue.js resolves Foo.vue.d.ts; plain Foo.vue only works in bundler mode.
beforeWriteFile(filePath, content) {
return {
filePath,
content: content.replace(
/((?:from\s+|import\s*\(\s*)["'])(\.{1,2}\/[^"']+)(["'])/g,
(_match, prefix: string, path: string, suffix: string) => {
const target = /\.(?:[cm]?js|json|css)$/.test(path)
? path
: /\.ts$/.test(path)
? path.slice(0, -3) + ".js"
: path + ".js";
return prefix + target + suffix;
},
),
};
},
}),
],
build: {