Last active
April 3, 2018 12:41
-
-
Save jthegedus/645c3103ddd81cbc3c4c1d98ba721cce to your computer and use it in GitHub Desktop.
next.js plugin
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 nextEnv = require('next-env'); | |
const nextEnvOpts = { ... }; | |
module.exports = (phase, {defaultConfig}) => { | |
return nextEnv(nextEnvOpts, defaultConfig, phase); // explicitly pass phase | |
} | |
/// with other plugins | |
const withTypescript = require('@zeit/next-typescript') | |
module.exports = (phase, {defaultConfig}) => { | |
return withTypescript(nextEnv(nextEnvOpts, defaultConfig, phase)); // explicitly pass phase | |
} |
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 nextEnv = require('next-env'); | |
const nextEnvOpts = { ... }; | |
const withNextEnv = nextEnv(nextEnvOpts); | |
module.exports = withNextEnv({ // is phase implicitly passed? | |
... // default config | |
}) | |
/// with other plugins | |
const withTypescript = require('@zeit/next-typescript') | |
module.exports = withTypescript(nextEnv(nextEnvOpts, { ... } )); // is phase implicitly passed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment