We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const DotenvPath = .env.${process.env.NODE_ENV} console.log(DotenvPath) // .env.dev
.env.${process.env.NODE_ENV}
module.exports = merge(common, { plugins: [ new DotEnv({ path: DotenvPath }) ] })
2.use string methods ------------ module.exports = merge(common, { plugins: [ new DotEnv({ path: “.env.dev” }) ] })
In this way, the corresponding environment file can be loaded
I'm not sure if I didn't understand the concept clearly or if dotenv-webpack is inherently flawed
The text was updated successfully, but these errors were encountered:
@timkelty
Sorry, something went wrong.
I’m having a hard time following you. Please format your code correctly and I’ll be happy to help.
No branches or pull requests
const common = require("./webpack.common.js")
const { merge } = require("webpack-merge")
const DotEnv = require("dotenv-webpack")
const webpack = require("webpack")
const DotenvPath =
.env.${process.env.NODE_ENV}
console.log(DotenvPath) // .env.dev
module.exports = merge(common, {
plugins: [
new DotEnv({
path: DotenvPath
})
]
})
2.use string methods ------------
module.exports = merge(common, {
plugins: [
new DotEnv({
path: “.env.dev”
})
]
})
In this way, the corresponding environment file can be loaded
I'm not sure if I didn't understand the concept clearly or if dotenv-webpack is inherently flawed
The text was updated successfully, but these errors were encountered: