fix: update import path for SingleDatePicker and adjust Vite configuration for output filenames
All checks were successful
Publish to npm / publish (push) Successful in 29s

This commit is contained in:
Astrian Zheng 2025-02-20 14:46:29 +11:00
parent 952b053e9c
commit c0b833be6f
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA
2 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,3 @@
import './style.scss'
export {default as SingleDatePicker} from './components/SingleDatePicker.tsx'
export {default as SingleDatePicker} from './components/SingleDatePicker'

View File

@ -8,20 +8,30 @@ export default defineConfig(({mode}) => ({
lib: {
entry: "src/index.ts",
name: "datenel-react",
fileName: format => `datenel.${format}.js`,
fileName: format => `index.${format}.js`,
},
rollupOptions: {
external: ["react"],
output: {
globals: {
react: "React",
"react-dom": "ReactDOM",
},
assetFileNames: assetInfo => {
if (assetInfo.names[0].endsWith(".css")) {
return "index.css";
}
return `assets/${assetInfo.names[0]}`;
}
},
},
},
},
plugins: [react(), dts({
plugins: [
react(),
dts({
tsconfigPath: "./tsconfig.app.json"
})],
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),