vite-plugin-module
v0.0.0
Published
plugin to get vite module info
Downloads
1
Readme
vite-plugin-module
plugin to get vite module info
Before
import { id } from "module";
console.log(id);
After
console.log("@/views/HomePage.tsx");
Config
const moduleRollupPlugin = require('rollup-plugin-module');
const moduleVitePlugin = require('vite-plugin-module');
const plugins = [
{
...moduleRollupPlugin({
baseUrl: "./src",
idPrefix: "@/",
include: ['src/**'],
exclude: [/\.(html|css|scss)(\?.*)?/]
}),
enforce: "pre",
apply: "build"
},
{
...moduleVitePlugin({
baseUrl: "./src",
idPrefix: "@/",
include: ['src/**'],
exclude: [/\.(html|css|scss)(\?.*)?/]
}),
apply: "serve"
}
]