Created
December 7, 2017 00:35
-
-
Save ApprenticeGC/8bada3ae17ee950c5185e23195759add to your computer and use it in GitHub Desktop.
Custom Webpack setting in Next.js
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
const webpack = require('webpack') | |
module.exports = { | |
webpack: function (config) { | |
config.plugins.push( | |
new webpack.DefinePlugin({ | |
'process.env': { | |
S3_ACCESS_KEY: JSON.stringify(process.env.S3_ACCESS_KEY), | |
S3_SECRET_KEY: JSON.stringify(process.env.S3_SECRET_KEY) | |
}, | |
}) | |
) | |
return config | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment