Commit 5b7a306c authored by Dan Abramov's avatar Dan Abramov
Browse files

Minor tweaks

parent 9a70038b
No related merge requests found
Showing with 6 additions and 6 deletions
+6 -6
...@@ -96,13 +96,14 @@ module.exports = { ...@@ -96,13 +96,14 @@ module.exports = {
'react-native': 'react-native-web' 'react-native': 'react-native-web'
} }
}, },
// @remove-on-eject-begin
// Resolve loaders (webpack plugins for CSS, images, transpilation) from the // Resolve loaders (webpack plugins for CSS, images, transpilation) from the
// directory of `react-scripts` itself rather than the project directory. // directory of `react-scripts` itself rather than the project directory.
// You can remove this after ejecting.
resolveLoader: { resolveLoader: {
root: paths.ownNodeModules, root: paths.ownNodeModules,
moduleTemplates: ['*-loader'] moduleTemplates: ['*-loader']
}, },
// @remove-on-eject-end
module: { module: {
// First, run the linter. // First, run the linter.
// It's important to do this before Babel processes the JS. // It's important to do this before Babel processes the JS.
......
...@@ -96,13 +96,14 @@ module.exports = { ...@@ -96,13 +96,14 @@ module.exports = {
'react-native': 'react-native-web' 'react-native': 'react-native-web'
} }
}, },
// @remove-on-eject-begin
// Resolve loaders (webpack plugins for CSS, images, transpilation) from the // Resolve loaders (webpack plugins for CSS, images, transpilation) from the
// directory of `react-scripts` itself rather than the project directory. // directory of `react-scripts` itself rather than the project directory.
// You can remove this after ejecting.
resolveLoader: { resolveLoader: {
root: paths.ownNodeModules, root: paths.ownNodeModules,
moduleTemplates: ['*-loader'] moduleTemplates: ['*-loader']
}, },
// @remove-on-eject-end
module: { module: {
// First, run the linter. // First, run the linter.
// It's important to do this before Babel processes the JS. // It's important to do this before Babel processes the JS.
......
...@@ -19,9 +19,6 @@ process.env.PUBLIC_URL = ''; ...@@ -19,9 +19,6 @@ process.env.PUBLIC_URL = '';
require('dotenv').config({silent: true}); require('dotenv').config({silent: true});
const jest = require('jest'); const jest = require('jest');
const path = require('path');
const paths = require('../config/paths');
const argv = process.argv.slice(2); const argv = process.argv.slice(2);
// Watch unless on CI // Watch unless on CI
...@@ -32,11 +29,12 @@ if (!process.env.CI) { ...@@ -32,11 +29,12 @@ if (!process.env.CI) {
// @remove-on-eject-begin // @remove-on-eject-begin
// This is not necessary after eject because we embed config into package.json. // This is not necessary after eject because we embed config into package.json.
const createJestConfig = require('./utils/createJestConfig'); const createJestConfig = require('./utils/createJestConfig');
const path = require('path');
const paths = require('../config/paths');
argv.push('--config', JSON.stringify(createJestConfig( argv.push('--config', JSON.stringify(createJestConfig(
relativePath => path.resolve(__dirname, '..', relativePath), relativePath => path.resolve(__dirname, '..', relativePath),
path.resolve(paths.appSrc, '..'), path.resolve(paths.appSrc, '..'),
false false
))); )));
// @remove-on-eject-end // @remove-on-eject-end
jest.run(argv); jest.run(argv);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment