feat(vite): check valid imports per environment (#3299)
Fixes https://github.com/denoland/fresh/issues/3296
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import process from "node:process";
|
||||
|
||||
export function NodeIsland() {
|
||||
return <h1>{process.version}</h1>;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { App, staticFiles } from "@fresh/core";
|
||||
|
||||
export const app = new App()
|
||||
.use(staticFiles())
|
||||
.fsRoutes();
|
||||
@@ -0,0 +1,5 @@
|
||||
import { NodeIsland } from "../islands/NodeIsland.tsx";
|
||||
|
||||
export default function Hello() {
|
||||
return <NodeIsland />;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { fresh } from "@fresh/plugin-vite";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [fresh()],
|
||||
});
|
||||
Reference in New Issue
Block a user