Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.

Commit f4ec67f

Browse files
author
Maël Nison
committed
Updates the sample app
1 parent 090107f commit f4ec67f

File tree

6 files changed

+412
-296
lines changed

6 files changed

+412
-296
lines changed

.babelrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
}]],
77
"plugins": [
88
"transform-class-properties",
9-
"transform-decorators-legacy"
9+
"transform-decorators-legacy",
10+
"transform-runtime"
1011
]
1112
}

.yarnrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
yarn-path "./yarn.js"
2+
--ignore-scripts true

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"private": true,
33
"dependencies": {
4+
"babel-runtime": "^6.26.0",
45
"core-decorators": "^0.20.0",
56
"lodash": "^4.17.5",
67
"react": "^16.2.0",
@@ -12,6 +13,7 @@
1213
"babel-loader": "^7.1.4",
1314
"babel-plugin-transform-class-properties": "^6.24.1",
1415
"babel-plugin-transform-decorators-legacy": "^1.3.4",
16+
"babel-plugin-transform-runtime": "^6.23.0",
1517
"babel-preset-env": "^1.6.1",
1618
"babel-preset-react": "^6.24.1",
1719
"eslint": "^5.5.0",

scripts/eslint-resolver.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ try {
66
// not a problem
77
}
88

9-
const NOTFOUND = { found: false};
9+
const NOTFOUND = {found: false};
1010

1111
module.exports = {
12-
interfaceVersion: 2,
13-
resolve: (source, file) => {
14-
if (!pnp) {
15-
throw new Error(`This resolver is meant to be used with pnp, but no pnp file was found`);
16-
}
12+
interfaceVersion: 2,
13+
resolve: (source, file) => {
14+
if (!pnp) {
15+
throw new Error(`This resolver is meant to be used with pnp, but no pnp file was found`);
16+
}
1717

18-
try {
19-
return { found: true, path: pnp.resolveRequest(source, file) };
20-
} catch (error) {
21-
return NOTFOUND;
22-
}
18+
try {
19+
return {found: true, path: pnp.resolveRequest(source, file)};
20+
} catch (error) {
21+
return NOTFOUND;
2322
}
23+
},
2424
};

0 commit comments

Comments
 (0)