codechips / svelte-typescript-setups Goto Github PK
View Code? Open in Web Editor NEWExamples and tests of different bundler setups for Svelte with Typescript and PostCSS (Tailwind)
Examples and tests of different bundler setups for Svelte with Typescript and PostCSS (Tailwind)
Need SVG's with SSR but seems sveltekit not works. SO can I use this for SSR?
Webpack link says "codechops.me" instead of "codechips.me"
svelte-vite-typescript on 'start' throws:
svelte-check found 0 errors, 0 warnings and 0 hints
warn - You have enabled experimental features: uniformColorPalette, extendedFontSizeScale, applyComplexClasses
warn - Experimental features are not covered by semver, may introduce breaking changes, and can change at any time.
[vite] Failed to resolve module import "svelte-inline-svg/src/index.js". (imported by /src/Wisdom.svelte)
[vite] Failed to resolve module import "svelte-inline-svg/src/index.js". (imported by /src/Wisdom.svelte)
[vite] Failed to resolve module import "svelte-inline-svg/src/index.js". (imported by /src/Wisdom.svelte)
[vite] Failed to resolve module import "svelte-inline-svg/src/index.js". (imported by /src/Wisdom.svelte)
svite example also does now work.
I want to combine svelte
and vite
, their performance is so amazing, but when I run yarn build
, I encountered some errors.
this is my vite.config.ts
:
import { defineConfig } from 'vite'
import svelte from 'rollup-plugin-svelte-hot'
import sveltePreprocess from 'svelte-preprocess'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
svelte({
preprocess: sveltePreprocess()
})
]
})
this is my script:
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"format": "prettier --write \"./**/*.ts\" \"./**/*.svelte\" "
},
when I run yarn build
,I get these error info:
$ vite build
building for production...
[svelte-preprocess] The file "/src/main.ts" was not found.
[svelte] Cannot find module './transformers/module'
.....
detail info in Logs๐
And this my repository : https://github.com/xieyezi/vite-vue3-react-svelte-todo-app/tree/main/packages/svelte-todo
^2.0.0-beta.50
Mac Os Catalina 10.15.7
v15.2.1
yarn 1.22.10
yarn run v1.22.10
$ vite build --debug
vite:config bundled config file loaded in 109ms +0ms
vite:config using resolved config: {
vite:config plugins: [
vite:config 'alias',
vite:config 'vite:dynamic-import-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:html',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'svelte',
vite:config 'vite:css-post',
vite:config 'vite:build-html',
vite:config 'commonjs',
vite:config 'vite:data-uri',
vite:config 'vite:define',
vite:config 'rollup-plugin-dynamic-import-variables',
vite:config 'vite:import-analysis',
vite:config 'vite:esbuild-transpile',
vite:config 'vite:terser',
vite:config 'vite:size'
vite:config ],
vite:config build: {
vite:config target: [ 'es2019', 'edge16', 'firefox60', 'chrome61', 'safari11' ],
vite:config polyfillDynamicImport: true,
vite:config outDir: 'dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
vite:config sourcemap: false,
vite:config rollupOptions: {},
vite:config commonjsOptions: { include: [Array], extensions: [Array] },
vite:config minify: 'terser',
vite:config terserOptions: {},
vite:config cleanCssOptions: {},
vite:config write: true,
vite:config emptyOutDir: null,
vite:config manifest: false,
vite:config lib: false,
vite:config ssr: false,
vite:config ssrManifest: false
vite:config },
vite:config configFile: '/Users/xieyezi/myself/vite-vue3-react-svelte-todo/packages/svelte-todo/vite.config.ts',
vite:config inlineConfig: {
vite:config root: undefined,
vite:config base: undefined,
vite:config mode: undefined,
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config build: {}
vite:config },
vite:config root: '/Users/xieyezi/myself/vite-vue3-react-svelte-todo/packages/svelte-todo',
vite:config command: 'build',
vite:config mode: 'production',
vite:config isProduction: true,
vite:config optimizeCacheDir: '/Users/xieyezi/myself/vite-vue3-react-svelte-todo/packages/svelte-todo/node_modules/.vite',
vite:config alias: [
vite:config {
vite:config find: /^\/@vite\//,
vite:config replacement: '/Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/dist/client/'
vite:config }
vite:config ],
vite:config server: {},
vite:config env: { BASE_URL: '/', MODE: 'production', DEV: false, PROD: true },
vite:config assetsInclude: [Function: assetsInclude],
vite:config logger: {
vite:config hasWarned: false,
vite:config info: [Function: info],
vite:config warn: [Function: warn],
vite:config error: [Function: error],
vite:config clearScreen: [Function: clearScreen]
vite:config },
vite:config base: '/'
vite:config } +4ms
building for production...
[svelte-preprocess] The file "/src/main.ts" was not found.
[svelte] Cannot find module './transformers/module'
Require stack:
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/autoProcess.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/index.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/packages/svelte-todo/vite.config.ts
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/dist/node/chunks/dep-19255ed7.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/dist/node/cli.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/bin/vite.js
file: /Users/xieyezi/myself/vite-vue3-react-svelte-todo/packages/svelte-todo/index.html
error during build:
Error: Cannot find module './transformers/module'
Require stack:
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/autoProcess.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/index.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/packages/svelte-todo/vite.config.ts
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/dist/node/chunks/dep-19255ed7.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/dist/node/cli.js
- /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/vite/bin/vite.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:15)
at Function.Module._load (node:internal/modules/cjs/loader:763:27)
at Module.require (node:internal/modules/cjs/loader:991:19)
at require (node:internal/modules/cjs/helpers:92:18)
at /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/autoProcess.js:36:77
at async Object.exports.transform (/Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/autoProcess.js:36:29)
at async /Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/autoProcess.js:96:29
at async script (/Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte-preprocess/dist/autoProcess.js:124:33)
at async process_single_tag (/Users/xieyezi/myself/vite-vue3-react-svelte-todo/node_modules/svelte/compiler.js:28953:28)
at async Promise.all (index 0)
error Command failed with exit code 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.