Created
August 11, 2019 12:47
-
-
Save Weiyuan-Lane/7bf12ef29dedeadc881fb1e645839f35 to your computer and use it in GitHub Desktop.
Next.js config for inserting configuration environment variables on base path to use throughout the application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const basePath = '/spa-github-page-template'; // or '' if basePath needs to be left unchanged | |
const webpackBasePath = process.env.SPA_EXP_BUILD === 'true' ? basePath : ''; | |
module.exports = { | |
publicRuntimeConfig: { | |
basePath: webpackBasePath, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you.