-
This may be a silly question, but I didn't find an example of this in the examples: How woud I include the following line in next.config.js when the file exports bunch of other things too (such as env variables, webpack alias etc):
Here's an example:
Thanks so much in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
aralroca
Dec 9, 2020
Replies: 1 comment 1 reply
-
@kimmo-koo this should work module.exports = nextTranslate({
env: {
DB_HOST: process.env.DB_HOST,
DB_NAME: process.env.DB_NAME,
DB_USER: process.env.DB_USER,
DB_PASS: process.env.DB_PASS,
},
webpack(config, options) {
config.resolve.alias['~'] = path.resolve(__dirname);
return config
}
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aralroca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kimmo-koo this should work