Skip to content

Instantly share code, notes, and snippets.

@Nilanth

Nilanth/.js Secret

Created May 14, 2022 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nilanth/dc7cfeb9bb2a24f9de78d2bf1a27c44e to your computer and use it in GitHub Desktop.
Save Nilanth/dc7cfeb9bb2a24f9de78d2bf1a27c44e to your computer and use it in GitHub Desktop.
vite.config.js
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default ({ mode }) => {
return defineConfig({
plugins: [react()],
define: {
"process.env.NODE_ENV": `"${mode}"`,
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment