@nodomx/rollup-plugin-dev-server
v0.2.6
Published
Rollup development server with hot entry remounts for NodomX apps.
Downloads
361
Maintainers
Readme
@nodomx/rollup-plugin-dev-server
Rollup development server for NodomX apps.
Features:
- serves
public/anddist/ - injects a tiny live reload client into HTML
- hot-imports the rebuilt entry module and remounts the app root
Example:
import { nodomDevServer } from "@nodomx/rollup-plugin-dev-server";
export default {
plugins: [
nodomDevServer({
rootDir: "./public",
distDir: "./dist",
port: 3000
})
]
};For app bootstrapping, pair it with the runtime helper:
import { Nodom } from "nodomx";
import { bootstrapNodomApp } from "@nodomx/rollup-plugin-dev-server/runtime";
await bootstrapNodomApp({
entryUrl: import.meta.url,
load: () => import("./App.nd"),
nodom: Nodom,
selector: "#app"
});