-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: improve CSR starter 🍒 #8039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: build/v2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,22 @@ | |
import { qwikVite } from "@qwik.dev/core/optimizer"; | ||
import { defineConfig, type UserConfig } from "vite"; | ||
import tsconfigPaths from "vite-tsconfig-paths"; | ||
import { viteStaticCopy } from "vite-plugin-static-copy"; | ||
|
||
export default defineConfig((): UserConfig => { | ||
export default defineConfig((config): UserConfig => { | ||
return { | ||
plugins: [qwikVite({ csr: true }), tsconfigPaths({ root: "." })], | ||
plugins: [ | ||
qwikVite({ csr: true }), | ||
tsconfigPaths({ root: "." }), | ||
config.mode === "development" && | ||
viteStaticCopy({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed to resolve There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is it needed in dev mode? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. without this fix, in dev mode, is not resolving and serving the file correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm that seems wrong, vite should be parsing the index.html and resolving the qwikloader.js into a module. |
||
targets: [ | ||
{ | ||
src: "./node_modules/@qwik.dev/core/dist/qwikloader.js", | ||
dest: "@qwik.dev/core", | ||
}, | ||
], | ||
}), | ||
], | ||
}; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm - SPA implies multiple routes, no? Without qwik-router there's no routes...
Technically, it's the CSR starter.