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

Commit 3da87dd

Browse files
In aspnet-webpack-react 3.0.0+, remove the workaround for #1066. Templates that use this version of the package need to not have issue #1066
1 parent 117c1a6 commit 3da87dd

File tree

4 files changed

+4
-84
lines changed

4 files changed

+4
-84
lines changed

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"name": "aspnet-webpack-react",
3-
"version": "2.0.1",
3+
"version": "3.0.0-beta.1",
44
"description": "Helpers for using Webpack with React in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
55
"main": "index.js",
66
"scripts": {
77
"prepublish": "rimraf *.d.ts && tsc && echo 'Finished building NPM package \"aspnet-webpack-react\"'",
8-
"test": "echo \"Error: no test specified\" && exit 1",
9-
"postinstall": "node scripts/postinstall.js"
8+
"test": "echo \"Error: no test specified\" && exit 1"
109
},
1110
"author": "Microsoft",
1211
"license": "Apache-2.0",
@@ -17,12 +16,8 @@
1716
"type": "git",
1817
"url": "https://github.com/aspnet/JavaScriptServices.git"
1918
},
20-
"dependencies": {
21-
"@types/webpack": "2.2.15",
22-
"hjson": "2.4.3"
23-
},
2419
"devDependencies": {
25-
"@types/react": "15.0.29",
20+
"@types/webpack": "^2.2.0",
2621
"rimraf": "^2.5.4",
2722
"typescript": "^2.0.0",
2823
"webpack": "^2.2.0"

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/scripts/postinstall.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/src/index.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,3 @@ export { addReactHotModuleReplacementConfig } from './HotModuleReplacement';
44
// compatibility with aspnet-webpack 1.x. In aspnet-webpack 2.0, we can drop the old name (and also deprecate
55
// some other no-longer-supported functionality, such as LoadViaWebpack).
66
export { addReactHotModuleReplacementConfig as addReactHotModuleReplacementBabelTransform } from './HotModuleReplacement';
7-
8-
// Workaround for #1066
9-
//
10-
// The issue is that @types/react-router@4.0.12 is incompatible with @types/react@15.0.29
11-
// This is a problem because the ReactReduxSpa template that ships in 2.0.0-preview2 is pinned
12-
// to @types/react@15.0.29 but does *not* declare a direct dependency on @types/react-router,
13-
// which means we end up grabbing the latest @types/react-router.
14-
//
15-
// The temporary solution is for aspnet-webpack-react to add the following extra type information
16-
// that patches the compatibility issue. The longer-term solution will be for the templates to
17-
// pin versions of *every* package in the transitive closure, not just their direct dependencies.
18-
//
19-
// Note that for this workaround to work, the developer also needs 'aspnet-webpack-react' to be
20-
// present in the 'types' array in tsconfig.json. We automate the task of adding that in the
21-
// scripts/postinstall.js file in this package. Later, that action can be removed.
22-
23-
import * as React from 'react';
24-
declare module 'react' {
25-
interface Component<P, S={}> {}
26-
}

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack-react/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"target": "es5",
66
"declaration": true,
77
"outDir": ".",
8-
"lib": ["dom", "es2015"]
8+
"lib": ["es2015"]
99
},
1010
"files": [
1111
"src/index.ts"

0 commit comments

Comments
 (0)