You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tired to install your cli for my vite-solidjs project and i was having style and import alias issues however i have got very less time to actually clone your repo and update and create a pull request so i'll leave the solution in this issue itself 😊
for any vite project your alias should be configured like the following :
vite.config.js
take the following config for ref.
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
export default defineConfig({
plugins: [solidPlugin()],
server: {
port: 3000,
},
resolve: {
alias: {
"~": "/src"
/** this is the correction as vite doesn't allow you to use the __dirname directly
* and tells you mention the absolute path to the source dir */
}
},
build: {
target: 'esnext',
},
});
one more thing to take care of :
in your
tailwind.config.js
make sure to do this as your files will be of type js, jsx also which was not by default
content: ["./src/**/*.{js,jsx,ts,tsx}"],
/** add "node_modules/**/*" in the list if the style doen't take an effect
* i had to do that in my case it was later automatically removed */
The text was updated successfully, but these errors were encountered:
PratikVR
changed the title
There is a small correction
There is a small correction in the vite installation docs : I have provided some updates
Dec 20, 2024
I recently tired to install your cli for my vite-solidjs project and i was having style and import alias issues however i have got very less time to actually clone your repo and update and create a pull request so i'll leave the solution in this issue itself 😊
for any vite project your alias should be configured like the following :
take the following config for ref.
one more thing to take care of :
in your
make sure to do this as your files will be of type js, jsx also which was not by default
The text was updated successfully, but these errors were encountered: