mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-23 12:48:00 +08:00
Minor tweaks
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
6
packages/react-scripts/scripts/test.js
vendored
6
packages/react-scripts/scripts/test.js
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user