Closed MCheping8108 closed 9 months ago
in browser you can't access process directly, you need use webpack do some polyfill then you can access process.env variables
You also seem to be importing incorrectly. Here is the correct syntax for ES6 import: import ‘dotenv/config’
I have already switched to another method to replace the .env
file.
I want to use dotenv to load the .env file, but there is no error message in vscode, but this error message appears in the Microsoft Edge browser.
vscode
Microsoft Edge