1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

Add module resolver plugin.

This commit is contained in:
Bogdan Bodnar 2019-08-28 10:10:49 +02:00
parent e9910f269f
commit 2173770ebc
No known key found for this signature in database
GPG Key ID: 49E4169AD3CA42B0
6 changed files with 47 additions and 2 deletions

View File

@ -6,5 +6,12 @@ module.exports = {
plugins: [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-export-default-from",
["module-resolver", {
root: ["./src"],
alias: {
test: "./test",
underscore: "lodash",
},
}],
],
};

37
package-lock.json generated
View File

@ -1840,6 +1840,19 @@
"@types/babel__traverse": "^7.0.6"
}
},
"babel-plugin-module-resolver": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.2.0.tgz",
"integrity": "sha512-tjR0GvSndzPew/Iayf4uICWZqjBwnlMWjSx6brryfQ81F9rxBVqwDJtFCV8oOs0+vJeefK9TmdZtkIFdFe1UnA==",
"dev": true,
"requires": {
"find-babel-config": "^1.1.0",
"glob": "^7.1.2",
"pkg-up": "^2.0.0",
"reselect": "^3.0.1",
"resolve": "^1.4.0"
}
},
"babel-plugin-react-transform": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/babel-plugin-react-transform/-/babel-plugin-react-transform-3.0.0.tgz",
@ -4227,6 +4240,24 @@
}
}
},
"find-babel-config": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.2.0.tgz",
"integrity": "sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA==",
"dev": true,
"requires": {
"json5": "^0.5.1",
"path-exists": "^3.0.0"
},
"dependencies": {
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
}
}
},
"find-cache-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
@ -8871,6 +8902,12 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"reselect": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/reselect/-/reselect-3.0.1.tgz",
"integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=",
"dev": true
},
"resolve": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",

View File

@ -38,6 +38,7 @@
"babel-eslint": "^9.0.0",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
"babel-plugin-module-resolver": "^3.2.0",
"babel-plugin-react-transform": "^3.0.0",
"babel-polyfill": "^6.26.0",
"eslint": "^5.16.0",

View File

@ -39,7 +39,7 @@ export function Button({
? <span className="spinner-border spinner-border-sm" role="status" aria-hidden="true" /> : null;
return (
<button type="button" className={className} {...props}>
<button className={className} {...props}>
{span}
{" "}
{span ? " " : null}

View File

@ -44,7 +44,7 @@ export { WebSockets } from "webSockets/WebSockets";
export { Portal } from "utils/Portal";
// Foris URL
export { ForisURLs, REFORIS_URL_PREFIX } from "./forisUrls";
export { ForisURLs, REFORIS_URL_PREFIX } from "forisUrls";
// Validation
export {