Joe Pea
Joe Pea
SSolidJS
Created by Joe Pea on 9/4/2024 in #support
solid-router: navigate(-1) or navigate(path)? How do we know which?
There's a probably not uncommen scenario in routing: you navigate somewhere, then the app has a button to go back. For example, if you're on a home page, and you click a user profile, the back button could just run navigate(-1) and you'll be back at the home page, one entry previous in the browser history. But... what if you didn't start at the home page? For example, what if you copy/pasted the user profile URL into a new tab? It would no longer make sense for the back button to call navigate(-1) because there's nothing to go back to. So in this case it would make more sense for it to call navigate('/'), adding a new entry in the browser history. Is there a solution to this to make it easy? What's the best behavior? Should we just always call navigate('/') instead of navigate(-1) and make a new history item each time? Seems like the easy solution is to make a new history item each time, forget about navigate(-1).
1 replies
SSolidJS
Created by Joe Pea on 8/25/2024 in #support
how to make SSG use dynamic client-side routing instead of full page refresh?
I tried pre-rendering with server.prerender.crawLinks = true in app.config.ts, but when I change pages, each page does a non-ideal full page refresh. I'm guessing this means solid-start doesn't have client-side routing in SSG mode?
35 replies
SSolidJS
Created by Joe Pea on 8/24/2024 in #support
how to change solid-start build `target`?
No description
6 replies
SSolidJS
Created by Joe Pea on 8/24/2024 in #support
how to disable server output, enable *only* pre-rendering?
When I enable pre-rendering (SSG) with server.prerender.crawLinks = true, the npm run build command outputs both a server and static pre-render. How do we configure it to output only SSG without the server output?
3 replies
SSolidJS
Created by Joe Pea on 11/19/2023 in #support
How do we configure babel proposal decorators with Solid's vite plugin?
I've got this Stackblitz: https://stackblitz.com/edit/solidjs-templates-wyjc1i?file=index.html,src%2Findex.tsx,vite.config.ts,package.json No luck configuring decorators like so:
export default defineConfig({
plugins: [
solidPlugin({
babel: {
plugins: ['@babel/plugin-proposal-decorators', { version: '2023-05' }],
},
}),
],
export default defineConfig({
plugins: [
solidPlugin({
babel: {
plugins: ['@babel/plugin-proposal-decorators', { version: '2023-05' }],
},
}),
],
Stackblitz terminal shows this error:
[BABEL] /home/projects/solidjs-templates-wyjc1i/src/index.tsx: The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean. (While processing: "/home/projects/solidjs-templates-wyjc1i/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@babel/plugin-proposal-decorators/lib/index.js$inherits")
[BABEL] /home/projects/solidjs-templates-wyjc1i/src/index.tsx: The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean. (While processing: "/home/projects/solidjs-templates-wyjc1i/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@babel/plugin-proposal-decorators/lib/index.js$inherits")
Ask me why I have tooling fatigue. 🙃 Buildless for the win.
7 replies