Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6df9012

Browse files
harunhasdalrandycoulman
authored andcommittedMay 8, 2017
Remove path module from webpack config on eject. (facebook#1175)
* Remove path module from webpack config on eject. Fixes facebook#1174 * Move path module inclusion right after the other imports Re: facebook#1174
1 parent b6ad925 commit 6df9012

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
 

‎packages/react-scripts/config/webpack.config.dev.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
// @remove-on-eject-end
1111

12-
var path = require('path');
1312
var autoprefixer = require('autoprefixer');
1413
var webpack = require('webpack');
1514
var HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -19,6 +18,11 @@ var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeMod
1918
var getClientEnvironment = require('./env');
2019
var paths = require('./paths');
2120

21+
// @remove-on-eject-begin
22+
// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
23+
var path = require('path');
24+
// @remove-on-eject-end
25+
2226
// Webpack uses `publicPath` to determine where the app is being served from.
2327
// In development, we always serve from the root. This makes config easier.
2428
// ZEAL: Setting publicPath in the start script and passing it in. Since we are

‎packages/react-scripts/config/webpack.config.prod.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
// @remove-on-eject-end
1111

12-
var path = require('path');
1312
var autoprefixer = require('autoprefixer');
1413
var webpack = require('webpack');
1514
var HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -20,6 +19,11 @@ var url = require('url');
2019
var paths = require('./paths');
2120
var getClientEnvironment = require('./env');
2221

22+
// @remove-on-eject-begin
23+
// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
24+
var path = require('path');
25+
// @remove-on-eject-end
26+
2327
function ensureSlash(path, needsSlash) {
2428
var hasSlash = path.endsWith('/');
2529
if (hasSlash && !needsSlash) {

0 commit comments

Comments
 (0)
Please sign in to comment.