Hi Svep, — env.NODE_ENV
Adeel Imran

Hi Adeel, tnx for quick answer!

Anyway, I can’t get DefinePlugin working :/ For example if I try to set MYVARIABLE and then use it in app.js, I get in console.log error undefined variable. I use:

const productionConfiguration = function (env) {
return {
plugins: [
new webpack.DefinePlugin({ MYVARIABLE: JSON.stringify('test-value') })


import React from 'react';
import { render } from 'react-dom';
import './styles.scss';


const App = () => {
return (
<h3>Our Application Is Alive</h3>
<p>This isn’t reality. This — is fantasy.</p>
<p>Yes I am quoting Star Trek I cant help it.</p>

render(<App />, document.getElementById('app'));

But it seems I am not the only one who cant use DefinePlugin :/

Like what you read? Give Svep AB a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.