Can not use SM with Vite & @svitejs/vite-plugin-svelte in dev environment
Opened this issue · 1 comments
Deleted user commented
If I import svelte-maretialify library I got the error in Chrome:
Slider.svelte:1
Uncaught SyntaxError: The requested module '/node_modules/svelte-materialify/dist/components/Slider/nouislider.min.js' does not provide an export named 'default'
In production build anything is ok
tsconfig.json
:
{
"extends": "@tsconfig/svelte/tsconfig.json",
"include": ["src/**/*"],
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["svelte", "vite/client"],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
}
}
svelte.config.js
:
const autoPreprocess = require('svelte-preprocess')
module.exports = {
preprocess: autoPreprocess({
defaults: {
script: 'typescript',
},
postcss: true,
}),
}
Florian-Schoenherr commented
See #171