Skip to content

next.config.js question #394

Answered by aralroca
kimmo-koo asked this question in Q&A
Dec 9, 2020 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@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
  }
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kimmo-koo
Comment options

Answer selected by aralroca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants