Skip to content

Instantly share code, notes, and snippets.

@ApprenticeGC
Created December 7, 2017 00:35
Show Gist options
  • Save ApprenticeGC/8bada3ae17ee950c5185e23195759add to your computer and use it in GitHub Desktop.
Save ApprenticeGC/8bada3ae17ee950c5185e23195759add to your computer and use it in GitHub Desktop.
Custom Webpack setting in Next.js
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