-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove obsolete webpack plugins (#5158)
Since we are now using webpacks `mode` flag we can get rid of: * `webpack.optimize.ModuleConcatenationPlugin` * `webpack.DefinePlugin` (`process.env.NODE_ENV`) https://webpack.js.org/concepts/mode/
- Loading branch information
1 parent
1f64082
commit 34cb05a
Showing
7 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default () => ( | ||
<div id='node-env'>{process.env.NODE_ENV}</div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* global describe, it, expect */ | ||
import webdriver from 'next-webdriver' | ||
|
||
export default (context, render) => { | ||
describe('process.env', () => { | ||
it('should set process.env.NODE_ENV in development', async () => { | ||
const browser = await webdriver(context.appPort, '/process-env') | ||
const nodeEnv = await browser.elementByCss('#node-env').text() | ||
expect(nodeEnv).toBe('development') | ||
browser.close() | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default () => ( | ||
<div id='node-env'>{process.env.NODE_ENV}</div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* global describe, it, expect */ | ||
import webdriver from 'next-webdriver' | ||
|
||
export default (context) => { | ||
describe('process.env', () => { | ||
it('should set process.env.NODE_ENV in production', async () => { | ||
const browser = await webdriver(context.appPort, '/process-env') | ||
const nodeEnv = await browser.elementByCss('#node-env').text() | ||
expect(nodeEnv).toBe('production') | ||
browser.close() | ||
}) | ||
}) | ||
} |