Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Aug 12, 2024
1 parent 20152b7 commit bca7985
Show file tree
Hide file tree
Showing 4 changed files with 895 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {foo} from "lib";
console.log(foo());
console.log(import.meta.env["VITE_CUSTOM"]);
console.log(import.meta.env.VITE_CUSTOM);
// console.log(import.meta.env["VITE_CUSTOM"]);
// console.log(import.meta.env.VITE_CUSTOM);
8 changes: 5 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {createStore} from "zustand";

export const foo = () => {
return createStore();
// https://github.com/pmndrs/zustand/blob/a56e76db5261291dcf9a88573dac58f67edb93db/rollup.config.js#L67-L70
console.log(import.meta.env ? import.meta.env.MODE : undefined);

// this could be any "define" which is used in app mode but not in lib mode.
console.log(process.env.TEST);
};
Loading

0 comments on commit bca7985

Please sign in to comment.