Last active
June 10, 2020 21:30
-
-
Save jermsam/073c717f98d8a32c063daba96b9a3294 to your computer and use it in GitHub Desktop.
This file contains 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
// incase you want your custom nextjs modules to be imported as absolute paths | |
require('dotenv').config() | |
const path = require('path'); | |
module.exports ={ | |
env:{ | |
MY_STEP:process.env.MY_STEP | |
}, | |
serverRuntimeConfig: { | |
// Will only be available on the server side | |
MY_SECRET: process.env.MY_SECRET | |
}, | |
publicRuntimeConfig: { | |
// Will be available on both server and client | |
API_ENDPOINT: '/myapi/version/1', | |
}, | |
// enable absolute path (eg: container/Home instead of ../container/Home) | |
webpack(config) { | |
config.resolve.modules.push(path.resolve('./')) | |
return config | |
} | |
} |
This file contains 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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"lib": [ | |
"dom", | |
"dom.iterable", | |
"esnext" | |
], | |
"allowJs": true, | |
"skipLibCheck": true, | |
"strict": true, | |
"forceConsistentCasingInFileNames": true, | |
"noEmit": true, | |
"esModuleInterop": true, | |
"module": "esnext", | |
"moduleResolution": "node", | |
"resolveJsonModule": true, | |
"isolatedModules": true, | |
"jsx": "preserve", | |
"baseUrl": ".", | |
"paths": { | |
"*": [ | |
"*" | |
] | |
} | |
}, | |
"exclude": [ | |
"node_modules" | |
], | |
"include": [ | |
"next-env.d.ts", | |
"**/*.ts", | |
"**/*.tsx" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment