How to create new param
4spen opened this issue · 3 comments
4spen commented
Hi, need some advice on how to create something like isProd? And how to rename isDev?
trapcodeio commented
isDev
was internally defined by the plugin and unfortunately cannot be renamed but you can add isProd
or any other param you want like so.
import {defineConfig} from "vite";
import {ViteEjsPlugin} from "vite-plugin-ejs";
export default defineConfig({
plugins: [
ViteEjsPlugin((viteConfig) => {
// viteConfig is the current viteResolved config.
return {
isProd: viteConfig.isProduction,
someOtherParam: "value"
}
}),
],
});
The viteConfig
variable has the options listed in https://vitejs.dev/config/#shared-options
Do let me know if this is what you meant by adding param.
trapcodeio commented
Did this serve? @4spen
If no reply I would close this issue in the next 48 hrs.
4spen commented
This helped me, thank you!
…On Sat, Nov 20, 2021 at 12:59 PM TrapCode ***@***.***> wrote:
Did this serve? @4spen <https://github.com/4spen>
If no reply I would close this issue in the next 48 hrs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEB2HAQZ45HXSRGKXY3BK5LUM55RBANCNFSM5HTBTYXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Geros dienos,
Evelina Rimkutė