Skip to content

Commit 5cc329d

Browse files
author
harunhasdal
committed
Move path module inclusion right after the other imports
Re: facebook#1174
1 parent a438f17 commit 5cc329d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
*/
1010
// @remove-on-eject-end
1111

12-
// @remove-on-eject-begin
13-
// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
14-
var path = require('path');
15-
// @remove-on-eject-end
1612
var autoprefixer = require('autoprefixer');
1713
var webpack = require('webpack');
1814
var HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -22,6 +18,11 @@ var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeMod
2218
var getClientEnvironment = require('./env');
2319
var paths = require('./paths');
2420

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+
2526
// Webpack uses `publicPath` to determine where the app is being served from.
2627
// In development, we always serve from the root. This makes config easier.
2728
var publicPath = '/';

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
*/
1010
// @remove-on-eject-end
1111

12-
// @remove-on-eject-begin
13-
// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
14-
var path = require('path');
15-
// @remove-on-eject-end
1612
var autoprefixer = require('autoprefixer');
1713
var webpack = require('webpack');
1814
var HtmlWebpackPlugin = require('html-webpack-plugin');
@@ -23,6 +19,11 @@ var url = require('url');
2319
var paths = require('./paths');
2420
var getClientEnvironment = require('./env');
2521

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+
2627
function ensureSlash(path, needsSlash) {
2728
var hasSlash = path.endsWith('/');
2829
if (hasSlash && !needsSlash) {

0 commit comments

Comments
 (0)