Last active
August 11, 2019 10:14
-
-
Save Weiyuan-Lane/d4aba202f7cb7da87fa2842d05ccf5e2 to your computer and use it in GitHub Desktop.
Next.js config for build process with base path as asset prefix
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 = { | |
assetPrefix: webpackBasePath, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment