Skip to content

Commit ab495db

Browse files
committed
Just hardcoding to react_app_ga
putting process.env into html gives parsing error, going to just hardcode for now. Will either eject from cra or bring in their fix from facebook#1037
1 parent b81561b commit ab495db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: packages/react-scripts/config/webpack.config.prod.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ module.exports = {
218218
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
219219
// In production, it will be an empty string unless you specify "homepage"
220220
// in `package.json`, in which case it will be the pathname of that URL.
221-
new InterpolateHtmlPlugin(env['process.env']),
221+
new InterpolateHtmlPlugin({
222+
PUBLIC_URL: publicUrl,
223+
REACT_APP_GA: env['process.env'].REACT_APP_GA || ''
224+
}),
222225
// Generates an `index.html` file with the <script> injected.
223226
new HtmlWebpackPlugin({
224227
inject: true,

0 commit comments

Comments
 (0)