diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index d756c9142a4ebd24cff5e0d68ae22ef983a02f28..d2d4009ac99cfcd240ef4ddc07a6d2e55157c025 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -96,13 +96,14 @@ module.exports = { 'react-native': 'react-native-web' } }, + // @remove-on-eject-begin // Resolve loaders (webpack plugins for CSS, images, transpilation) from the // directory of `react-scripts` itself rather than the project directory. - // You can remove this after ejecting. resolveLoader: { root: paths.ownNodeModules, moduleTemplates: ['*-loader'] }, + // @remove-on-eject-end module: { // First, run the linter. // It's important to do this before Babel processes the JS. diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 8087bf7d0d90fa52e2f624f3eee51779ec733bc9..a1e3e831bc964165df633142002a94f85deb3f69 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -96,13 +96,14 @@ module.exports = { 'react-native': 'react-native-web' } }, + // @remove-on-eject-begin // Resolve loaders (webpack plugins for CSS, images, transpilation) from the // directory of `react-scripts` itself rather than the project directory. - // You can remove this after ejecting. resolveLoader: { root: paths.ownNodeModules, moduleTemplates: ['*-loader'] }, + // @remove-on-eject-end module: { // First, run the linter. // It's important to do this before Babel processes the JS. diff --git a/packages/react-scripts/scripts/test.js b/packages/react-scripts/scripts/test.js index 018a0f1ea8687d0fcb8251bae17e4af898d73610..5fafb458b5ab8c74e33f2b4fad880fb4f6473b12 100644 --- a/packages/react-scripts/scripts/test.js +++ b/packages/react-scripts/scripts/test.js @@ -19,9 +19,6 @@ process.env.PUBLIC_URL = ''; require('dotenv').config({silent: true}); const jest = require('jest'); -const path = require('path'); -const paths = require('../config/paths'); - const argv = process.argv.slice(2); // Watch unless on CI @@ -32,11 +29,12 @@ if (!process.env.CI) { // @remove-on-eject-begin // This is not necessary after eject because we embed config into package.json. const createJestConfig = require('./utils/createJestConfig'); +const path = require('path'); +const paths = require('../config/paths'); argv.push('--config', JSON.stringify(createJestConfig( relativePath => path.resolve(__dirname, '..', relativePath), path.resolve(paths.appSrc, '..'), false ))); // @remove-on-eject-end - jest.run(argv);