Skip to content

Commit

Permalink
Merge pull request #153 from ui-router/context-api
Browse files Browse the repository at this point in the history
New React 16.3 context API
  • Loading branch information
elboman authored Apr 26, 2018
2 parents 6beeb2c + b6387f1 commit bf8162f
Show file tree
Hide file tree
Showing 15 changed files with 1,237 additions and 1,068 deletions.
6 changes: 4 additions & 2 deletions examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
"name": "@uirouter/react-simple-example",
"version": "1.0.0",
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8000 --history-api-fallback"
"start":
"cross-env NODE_ENV=development webpack-dev-server --host 0.0.0.0 --port 8000 --history-api-fallback"
},
"dependencies": {
"@uirouter/react": "^0.5.0",
"react": "16.1.1",
"react-dom": "16.1.1"
},
"devDependencies": {
"awesome-typescript-loader": "^3.2.1",
"cross-env": "^5.0.1",
"prop-types": "^15.5.10",
"tsconfig-paths-webpack-plugin": "^3.0.3",
"ts-loader": "^4.1.0",
"typescript": "2.3.3",
"webpack": "^3.0.0",
"webpack-dev-server": "^2.5.0"
Expand Down
3 changes: 2 additions & 1 deletion examples/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"paths": {
"react": ["../../node_modules/react"],
"react-dom": ["../../node_modules/react-dom"],
"@uirouter/react": ["../../src/index.ts"]
"@uirouter/react": ["../../src/index.ts"],
"@uirouter/core": ["../../node_modules/@uirouter/core"]
}
},
"files": ["./index.tsx"],
Expand Down
9 changes: 5 additions & 4 deletions examples/typescript/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
var path = require('path');
const { TsConfigPathsPlugin } = require('awesome-typescript-loader');
var TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

var configFilePath = path.resolve(__dirname, 'tsconfig.json');

var config = {
mode: 'development',
entry: [path.resolve(__dirname, './index.tsx')],
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
plugins: [new TsConfigPathsPlugin({ configFileName: configFilePath })],
plugins: [new TsconfigPathsPlugin({ configFile: configFilePath })],
},
devtool: 'inline-source-map',
module: {
Expand All @@ -20,8 +21,8 @@ var config = {
test: /\.tsx?$/,
use: [
{
loader: 'awesome-typescript-loader',
query: { configFileName: configFilePath },
loader: 'ts-loader',
options: { configFile: configFilePath },
},
],
exclude: /(node_modules|__tests__)/,
Expand Down
Loading

0 comments on commit bf8162f

Please sign in to comment.