Fresh install to test but error
Closed this issue · 4 comments
Uncaught Error: If you're seeing this error, it is likely your bundler isn't configured correctly.
at css (@acab_ecsstatic.js?v=795af591:3:9)
at Button.jsx:18:19
Tested on SolidJs 1.8.5 with vite 4.4.11 as 5.0.0 does not work yet with solidjs
if it's any consolation, I get similar messages with solid-styled. So far nobody has given any answers.
could you provide a repro? it works fine here: https://stackblitz.com/github/mayank99/ecsstatic/tree/main/demos/vite-solid?file=src%2FApp.tsx
I got it working from your example, it seems that my vite.config.js did not acquire your app
My vite.config.js
import { defineConfig } from 'vite';
import solid from 'vite-plugin-solid';
export default defineConfig({
plugins: [solid()],
});
Your vite.config.ts
import { defineConfig } from 'vite';
import solid from 'vite-plugin-solid';
import { ecsstatic } from '@acab/ecsstatic/vite';
export default defineConfig({
plugins: [solid(), ecsstatic()],
});
Why it's not installing correctly, I have no idea. but thank you for such a quick and helpful response.
Installing a package generally does not add it to the config automatically. It's mentioned in the README, but let me know if the instructions can be improved. Cheers!
That's good to know, and how I missed that I don't know, but I have been going over many css solutions. With the goal of copying normal css directly into the jsx and dynamically changing values.
As for improving the readme, I probably would be wondering which config, but I did notice the vite import extension.
Sorry if this was a time waste for you.