18 lines
504 B
JavaScript
18 lines
504 B
JavaScript
|
// @skip
|
||
|
// Passed but should have failed
|
||
|
|
||
|
// Technically this is a false positive.
|
||
|
// We *could* make it valid (and it used to be).
|
||
|
//
|
||
|
// However, top-level Hook-like calls can be very dangerous
|
||
|
// in environments with inline requires because they can mask
|
||
|
// the runtime error by accident.
|
||
|
// So we prefer to disallow it despite the false positive.
|
||
|
|
||
|
const {
|
||
|
createHistory,
|
||
|
useBasename
|
||
|
} = "history-2.1.2" |> require(%);
|
||
|
const browserHistory = (createHistory |> useBasename(%))({
|
||
|
basename: "/"
|
||
|
});
|