Commit e59feab9 by Wee

fix: default import for `tiny-invariant`

parent 0c35da0a
es
dist
/dist
node_modules
umd
!rollup.config.js
/coverage
/npm-debug.log
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var LiveRoute_1 = require("./LiveRoute");
exports.default = LiveRoute_1.default;
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;AAAA,yCAAmC;AAEnC,kBAAe,mBAAS,CAAA"}
\ No newline at end of file
{
"name": "react-live-route",
"version": "3.0.5",
"version": "3.0.6",
"description": "A living route for react-router v4",
"repository": "fi3ework/react-live-route",
"license": "MIT",
......@@ -18,19 +18,17 @@
},
"peerDependencies": {
"react": ">=16.3",
"react-router-dom": ">=4"
"react-router-dom": ">=4",
"tiny-invariant": ">=1",
"tiny-warning": ">=1"
},
"files": [
"dist/"
],
"dependencies": {
"history": "^4.9.0",
"invariant": "^2.2.4",
"prop-types": "^15.6.1",
"react-is": "^16.7.0",
"tiny-invariant": "^1.0.3",
"tiny-warning": "^1.0.2",
"warning": "^4.0.1"
"react-is": "^16.7.0"
},
"devDependencies": {
"@types/jest": "^24.0.9",
......
......@@ -5,8 +5,8 @@ import * as React from 'react'
import * as ReactDOM from 'react-dom'
import { isValidElementType } from 'react-is'
import { match, matchPath, RouteComponentProps, RouteProps } from 'react-router'
import * as invariant from 'tiny-invariant'
import * as warning from 'tiny-warning'
import invariant from 'tiny-invariant'
import warning from 'tiny-warning'
declare var __DEV__: boolean
......@@ -198,7 +198,7 @@ class LiveRoute extends React.Component<PropsType, any> {
} = this.props
let { children } = this.props
const context = { history, location, match, staticContext }
// invariant(context, 'You should not use <Route> outside a <Router>')
invariant(context, 'You should not use <Route> outside a <Router>')
const matchOfPath = this.props.path ? matchPath(location.pathname, this.props) : context.match
const matchOfLivePath = this.isLivePathMatch(livePath, alwaysLive, location!.pathname, {
......
......@@ -8,6 +8,7 @@
"strict": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"outDir": "dist/",
"module": "commonjs",
"target": "es5",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment