on 2.8.1
simple project as:
// package.json
{
"dependencies": {
"solid-js": "^1.8.11",
"vite": "^5.0.11",
"vite-plugin-solid": "^2.8.1"
}
}
// index.jsx (copy from solidjs tutorial)
import { render } from "solid-js/web";
import { createSignal } from "solid-js";
function Counter() {
const [count, setCount] = createSignal(0);
setInterval(() => setCount(count() + 1), 1000);
return <div>Count: {count()}</div>;
}
render(() => <Counter />, document.getElementById('root'));
// vite.config.js
import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";
export default defineConfig({
plugins: [ solidPlugin()],
server: {port: 3000},
build: {target: "esnext"},
});
run:
browser get:
Uncaught ReferenceError: _tmpl$ is not defined
nothing rendered
but...
"vite-plugin-solid": "=2.8.0"
work fine
env
node v18.18.0
npm 9.8.1
kubuntu 22.04
on 2.8.1
simple project as:
run:
browser get:
nothing rendered
but...
work fine
env
node v18.18.0
npm 9.8.1
kubuntu 22.04