Fix environment variable not being interpreted as string.

pull/70/head
Andrei Poenaru 8 years ago
parent 10c9d36661
commit 33746471a1

@ -94,7 +94,7 @@ export default class App extends React.Component {
</p> </p>
</footer> </footer>
<script>FilePizza()</script> <script>FilePizza()</script>
{ process.env.DISABLE_GA != 'yes' && <ga.Initializer /> } { process.env.DISABLE_GA != 'yes' ? <ga.Initializer /> : <div></div> }
</body> </body>
</html> </html>
); );

@ -30,7 +30,7 @@ module.exports = {
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env': { 'process.env': {
'DISABLE_GA': process.env.DISABLE_GA, 'DISABLE_GA': JSON.stringify(process.env.DISABLE_GA),
} }
}) })
], ],

Loading…
Cancel
Save