Open
Description
Hello, I'm using this DatePicker for Svelte (not Svelte-kit) project with Vite. However the browser's console print this error:
Uncaught (in promise) SyntaxError: The requested module '/node_modules/dayjs/plugin/isSameOrAfter.js?v=493692cb' does not provide an export named 'default'
My vite.config.js:
import {svelte} from '@sveltejs/vite-plugin-svelte'
import {defineConfig} from 'vite'
import {minify} from 'html-minifier'
const minifyHtml = () => {
return {
name: 'html-transform',
transformIndexHtml(html) {
return minify(html, {
collapseWhitespace: true,
})
},
}
}
module.exports = defineConfig(({mode}) => {
const isProduction = mode === 'production'
return {
optimizeDeps: {
exclude: ['@roxi/routify'],
},
plugins: [svelte(), isProduction && minifyHtml()],
build: {
minify: isProduction,
},
}
})
Is there any solution for this?
Metadata
Metadata
Assignees
Labels
No labels