File tree 2 files changed +6
-1
lines changed
react-scripts/template/src
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ class ModuleScopePlugin {
48
48
request . descriptionFileRoot ,
49
49
requestFullPath
50
50
) ;
51
- if ( requestRelativeToRoot === 'package.json' ) {
51
+ if (
52
+ requestRelativeToRoot === 'package.json' ||
53
+ requestRelativeToRoot === 'package'
54
+ ) {
52
55
return callback ( ) ;
53
56
}
54
57
// Find path from src to the requested file
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
2
import logo from './logo.svg' ;
3
3
import './App.css' ;
4
+ import { version , name } from '../../package.json' ;
4
5
5
6
class App extends Component {
6
7
render ( ) {
@@ -9,6 +10,7 @@ class App extends Component {
9
10
< div className = "App-header" >
10
11
< img src = { logo } className = "App-logo" alt = "logo" />
11
12
< h2 > Welcome to React</ h2 >
13
+ < p > { `${ name } v${ version } ` } </ p >
12
14
</ div >
13
15
< p className = "App-intro" >
14
16
To get started, edit < code > src/App.js</ code > and save to reload.
You can’t perform that action at this time.
0 commit comments