Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created December 25, 2016 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/dd8060cfe46c32df01b9cbd7357e1167 to your computer and use it in GitHub Desktop.
Save codeaholicguy/dd8060cfe46c32df01b9cbd7357e1167 to your computer and use it in GitHub Desktop.
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
...
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.html',
inject: true
}),
new webpack.DefinePlugin({
__CLIENT_ID__: JSON.stringify(process.env.CLIENT_ID || ''),
__REDIRECT_URI__: JSON.stringify(process.env.REDIRECT_URI || 'http://localhost:8080/callback')
}),
new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment