0.1.2 • Published 10 months ago

@postinumero/vite-plugin-remix-resolve-config-path v0.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

@postinumero/vite-plugin-remix-resolve-config-path

Import from Remix config paths

Setup

import remixResolveConfigPath from "@postinumero/vite-plugin-remix-resolve-config-path";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [remixResolveConfigPath],
});

Example

// Import the root
import * as root from "@postinumero/vite-plugin-remix-resolve-config-path/resolve/${path.join(config.appDirectory, config.routes.root.file)}";
// Or import using one of the presets
import * as root from "@postinumero/vite-plugin-remix-resolve-config-path/resolve/preset/root";

Available variables

NameValue
configRemix Config
importerimporter from Rollup's resolveId hook
pathnode:path