Skip to content

Commit f5bade4

Browse files
committed
refactor(extend): add environment variable handling for API_URL
1 parent bdead82 commit f5bade4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • refine-vite/plugins/data-provider-custom-json-rest

refine-vite/plugins/data-provider-custom-json-rest/extend.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const base = {
33
localImport: [`import { dataProvider } from "./providers/data";`],
44
refineProps: [`dataProvider={dataProvider}`],
55
},
6+
_env: {
7+
variables: ["VITE_API_URL=https://api.fake-rest.refine.dev"],
8+
},
69
_constants: {
710
export: [
811
'export const API_URL = import.meta.env.VITE_API_URL || "https://api.fake-rest.refine.dev";',

0 commit comments

Comments
 (0)