Skip to content

Commit 1ce8baa

Browse files
fix the loader issues (#36)
1 parent ac2de09 commit 1ce8baa

File tree

9 files changed

+113
-28
lines changed

9 files changed

+113
-28
lines changed

.changeset/b9002cdc/changes.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"releases": [{ "name": "@brisk-docs/website", "type": "patch" }],
3+
"dependents": []
4+
}

.changeset/b9002cdc/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- 1. Added missing dependencies into the package.json 2. Fixed the config.js to solve the babel loader issues while installing the package in a consumer app.

.changeset/bb3940f7/changes.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"releases": [{ "name": "@brisk-docs/react-changelogs", "type": "patch" }],
3+
"dependents": []
4+
}

.changeset/bb3940f7/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Changed the babel/core version to match the packages in the monorepo

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@atlaskit/tree": "^4.1.11",
5858
"@atlaskit/width-detector": "^0.3.1",
5959
"@babel/cli": "^7.2.3",
60-
"@babel/core": "^7.3.4",
60+
"@babel/core": "^7.0.0-0",
6161
"@babel/plugin-proposal-class-properties": "^7.3.4",
6262
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
6363
"@babel/plugin-transform-runtime": "^7.3.4",
@@ -68,14 +68,15 @@
6868
"@emotion/core": "^10.0.9",
6969
"@emotion/styled": "^10.0.9",
7070
"@mdx-js/loader": "^0.17.5",
71-
"@mdx-js/mdx": "^0.17.5",
71+
"@mdx-js/mdx": "^0.15.0",
7272
"@mdx-js/tag": "^0.17.5",
7373
"@zeit/next-css": "^1.0.1",
7474
"@zeit/next-mdx": "^1.2.0",
7575
"babel-loader": "^8.0.5",
7676
"babel-plugin-transform-dynamic-import": "^2.1.0",
7777
"babel-plugin-transform-flow-strip-types": "^6.22.0",
7878
"command-line-args": "^5.0.2",
79+
"emotion": "^9.1.3",
7980
"emotion-server": "^9.2.12",
8081
"eslint-plugin-emotion": "^10.0.7",
8182
"express": "^4.16.4",

packages/react-changelogs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@atlaskit/pagination": "^10.0.1",
2929
"@atlaskit/theme": "^6.0.0",
3030
"@babel/cli": "^7.2.3",
31-
"@babel/core": "^7.3.4",
31+
"@babel/core": "^7.0.0-0",
3232
"@babel/plugin-proposal-class-properties": "^7.3.4",
3333
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
3434
"@babel/plugin-transform-runtime": "^7.3.4",

packages/website/next.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ module.exports = withCSS(
2323
config.externals = [];
2424

2525
config.module.rules.push({
26-
test: /\.(ts|tsx)$/,
27-
exclude: /node_modules/,
26+
test: /\.(ts|tsx|js|jsx)$/,
27+
exclude: /node_modules\/(?!@brisk-docs\/website)/, // exclude all node_modules except our website while using the loader within a consumer app.
2828
use: {
2929
loader: 'babel-loader',
3030
},
3131
});
3232

33+
// Website modules should take precedence over the node_modules of the consumer.
34+
config.resolve.modules.push(__dirname, 'node_modules');
35+
3336
// Adding items to globalScope in the website
3437
config.plugins.push(
3538
new webpack.ProvidePlugin({ Props: ['pretty-proptypes', 'default'] }),

packages/website/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,25 @@
3232
"@atlaskit/theme": "^6.0.0",
3333
"@atlaskit/tree": "^4.1.11",
3434
"@atlaskit/width-detector": "^0.3.1",
35+
"@babel/core": "^7.0.0-0",
3536
"@babel/plugin-proposal-class-properties": "^7.3.4",
3637
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
3738
"@babel/preset-flow": "^7.0.0",
3839
"@babel/preset-typescript": "^7.3.3",
3940
"@emotion/core": "^10.0.9",
4041
"@emotion/styled": "^10.0.9",
4142
"@mdx-js/loader": "^0.17.5",
42-
"@mdx-js/mdx": "^0.17.5",
43+
"@mdx-js/mdx": "^0.15.0",
4344
"@mdx-js/tag": "^0.17.5",
4445
"@zeit/next-css": "^1.0.1",
4546
"@zeit/next-mdx": "^1.2.0",
4647
"babel-loader": "^8.0.5",
48+
"babel-plugin-emotion": "^10.0.9",
49+
"babel-plugin-styled-components": "^1.10.0",
4750
"babel-plugin-transform-flow-strip-types": "^6.22.0",
4851
"bolt": "^0.22.6",
4952
"command-line-args": "^5.0.2",
53+
"emotion": "^9.1.3",
5054
"emotion-server": "^9.2.12",
5155
"express": "^4.16.4",
5256
"extract-react-types-loader": "^0.3.0",

yarn.lock

Lines changed: 89 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,26 @@
616616
semver "^5.4.1"
617617
source-map "^0.5.0"
618618

619+
"@babel/core@^7.0.0-0":
620+
version "7.4.0"
621+
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.0.tgz#248fd6874b7d755010bfe61f557461d4f446d9e9"
622+
integrity sha512-Dzl7U0/T69DFOTwqz/FJdnOSWS57NpjNfCwMKHABr589Lg8uX1RrlBIJ7L5Dubt/xkLsx0xH5EBFzlBVes1ayA==
623+
dependencies:
624+
"@babel/code-frame" "^7.0.0"
625+
"@babel/generator" "^7.4.0"
626+
"@babel/helpers" "^7.4.0"
627+
"@babel/parser" "^7.4.0"
628+
"@babel/template" "^7.4.0"
629+
"@babel/traverse" "^7.4.0"
630+
"@babel/types" "^7.4.0"
631+
convert-source-map "^1.1.0"
632+
debug "^4.1.0"
633+
json5 "^2.1.0"
634+
lodash "^4.17.11"
635+
resolve "^1.3.2"
636+
semver "^5.4.1"
637+
source-map "^0.5.0"
638+
619639
"@babel/core@^7.0.0-beta.56":
620640
version "7.2.2"
621641
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687"
@@ -654,25 +674,6 @@
654674
semver "^5.4.1"
655675
source-map "^0.5.0"
656676

657-
"@babel/core@^7.3.4":
658-
version "7.3.4"
659-
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.3.4.tgz#921a5a13746c21e32445bf0798680e9d11a6530b"
660-
dependencies:
661-
"@babel/code-frame" "^7.0.0"
662-
"@babel/generator" "^7.3.4"
663-
"@babel/helpers" "^7.2.0"
664-
"@babel/parser" "^7.3.4"
665-
"@babel/template" "^7.2.2"
666-
"@babel/traverse" "^7.3.4"
667-
"@babel/types" "^7.3.4"
668-
convert-source-map "^1.1.0"
669-
debug "^4.1.0"
670-
json5 "^2.1.0"
671-
lodash "^4.17.11"
672-
resolve "^1.3.2"
673-
semver "^5.4.1"
674-
source-map "^0.5.0"
675-
676677
677678
version "7.0.0-beta.56"
678679
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/generator/-/generator-7.0.0-beta.56.tgz#07d9c2f45990c453130e080eddcd252a9cbd8d66"
@@ -713,6 +714,17 @@
713714
source-map "^0.5.0"
714715
trim-right "^1.0.1"
715716

717+
"@babel/generator@^7.4.0":
718+
version "7.4.0"
719+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.0.tgz#c230e79589ae7a729fd4631b9ded4dc220418196"
720+
integrity sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==
721+
dependencies:
722+
"@babel/types" "^7.4.0"
723+
jsesc "^2.5.1"
724+
lodash "^4.17.11"
725+
source-map "^0.5.0"
726+
trim-right "^1.0.1"
727+
716728
"@babel/helper-annotate-as-pure@^7.0.0":
717729
version "7.0.0"
718730
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
@@ -887,6 +899,13 @@
887899
dependencies:
888900
"@babel/types" "^7.0.0"
889901

902+
"@babel/helper-split-export-declaration@^7.4.0":
903+
version "7.4.0"
904+
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz#571bfd52701f492920d63b7f735030e9a3e10b55"
905+
integrity sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==
906+
dependencies:
907+
"@babel/types" "^7.4.0"
908+
890909
"@babel/helper-wrap-function@^7.1.0":
891910
version "7.2.0"
892911
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa"
@@ -912,6 +931,15 @@
912931
"@babel/traverse" "^7.1.5"
913932
"@babel/types" "^7.3.0"
914933

934+
"@babel/helpers@^7.4.0":
935+
version "7.4.2"
936+
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.2.tgz#3bdfa46a552ca77ef5a0f8551be5f0845ae989be"
937+
integrity sha512-gQR1eQeroDzFBikhrCccm5Gs2xBjZ57DNjGbqTaHo911IpmSxflOQWMAHPw/TXk8L3isv7s9lYzUkexOeTQUYg==
938+
dependencies:
939+
"@babel/template" "^7.4.0"
940+
"@babel/traverse" "^7.4.0"
941+
"@babel/types" "^7.4.0"
942+
915943
916944
version "7.0.0-beta.56"
917945
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/highlight/-/highlight-7.0.0-beta.56.tgz#f8b0fc8c5c2de53bb2c12f9001ad3d99e573696d"
@@ -944,6 +972,11 @@
944972
version "7.3.4"
945973
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.4.tgz#a43357e4bbf4b92a437fb9e465c192848287f27c"
946974

975+
"@babel/parser@^7.4.0":
976+
version "7.4.2"
977+
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.2.tgz#b4521a400cb5a871eab3890787b4bc1326d38d91"
978+
integrity sha512-9fJTDipQFvlfSVdD/JBtkiY0br9BtfvW2R8wo6CX/Ej2eMuV0gWPk1M67Mt3eggQvBqYW1FCEk8BN7WvGm/g5g==
979+
947980
"@babel/plugin-proposal-async-generator-functions@^7.0.0", "@babel/plugin-proposal-async-generator-functions@^7.2.0":
948981
version "7.2.0"
949982
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e"
@@ -1557,6 +1590,15 @@
15571590
"@babel/parser" "^7.2.2"
15581591
"@babel/types" "^7.2.2"
15591592

1593+
"@babel/template@^7.4.0":
1594+
version "7.4.0"
1595+
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.0.tgz#12474e9c077bae585c5d835a95c0b0b790c25c8b"
1596+
integrity sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==
1597+
dependencies:
1598+
"@babel/code-frame" "^7.0.0"
1599+
"@babel/parser" "^7.4.0"
1600+
"@babel/types" "^7.4.0"
1601+
15601602
15611603
version "7.0.0-beta.56"
15621604
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/traverse/-/traverse-7.0.0-beta.56.tgz#62fdfe69328cfaad414ef01844f5ab40e32f4ad0"
@@ -1599,6 +1641,21 @@
15991641
globals "^11.1.0"
16001642
lodash "^4.17.11"
16011643

1644+
"@babel/traverse@^7.4.0":
1645+
version "7.4.0"
1646+
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.0.tgz#14006967dd1d2b3494cdd650c686db9daf0ddada"
1647+
integrity sha512-/DtIHKfyg2bBKnIN+BItaIlEg5pjAnzHOIQe5w+rHAw/rg9g0V7T4rqPX8BJPfW11kt3koyjAnTNwCzb28Y1PA==
1648+
dependencies:
1649+
"@babel/code-frame" "^7.0.0"
1650+
"@babel/generator" "^7.4.0"
1651+
"@babel/helper-function-name" "^7.1.0"
1652+
"@babel/helper-split-export-declaration" "^7.4.0"
1653+
"@babel/parser" "^7.4.0"
1654+
"@babel/types" "^7.4.0"
1655+
debug "^4.1.0"
1656+
globals "^11.1.0"
1657+
lodash "^4.17.11"
1658+
16021659
16031660
version "7.0.0-beta.56"
16041661
resolved "https://packages.atlassian.com/api/npm/npm-remote/@babel/types/-/types-7.0.0-beta.56.tgz#df456947a82510ec30361971e566110d89489056"
@@ -1631,6 +1688,15 @@
16311688
lodash "^4.17.11"
16321689
to-fast-properties "^2.0.0"
16331690

1691+
"@babel/types@^7.4.0":
1692+
version "7.4.0"
1693+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.0.tgz#670724f77d24cce6cc7d8cf64599d511d164894c"
1694+
integrity sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==
1695+
dependencies:
1696+
esutils "^2.0.2"
1697+
lodash "^4.17.11"
1698+
to-fast-properties "^2.0.0"
1699+
16341700
"@cypress/[email protected]":
16351701
version "0.4.1"
16361702
resolved "https://packages.atlassian.com/api/npm/npm-remote/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#a77492f4b11dcc7c446a34b3e28721afd33c642a"
@@ -1790,9 +1856,10 @@
17901856
"@mdx-js/tag" "^0.17.5"
17911857
loader-utils "^1.1.0"
17921858

1793-
"@mdx-js/mdx@^0.15.7":
1859+
"@mdx-js/mdx@^0.15.0", "@mdx-js/mdx@^0.15.7":
17941860
version "0.15.7"
1795-
resolved "https://packages.atlassian.com/api/npm/npm-remote/@mdx-js/mdx/-/mdx-0.15.7.tgz#5fde5841d7b6f4c78f80c19fff559532af5ce5ad"
1861+
resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-0.15.7.tgz#5fde5841d7b6f4c78f80c19fff559532af5ce5ad"
1862+
integrity sha512-bWUQidQhjTRFh5nK01kW3qQLCH/aCq6VTapOZ/+WI5hL4exoRw6TgnxxmgSf/p7mmrGxIpCHmnaWXdbHSObxlg==
17961863
dependencies:
17971864
change-case "^3.0.2"
17981865
detab "^2.0.0"
@@ -4551,7 +4618,7 @@ emotion-theming@^9.0.0:
45514618
dependencies:
45524619
hoist-non-react-statics "^2.3.1"
45534620

4554-
emotion@^9.1.1, emotion@^9.1.2:
4621+
emotion@^9.1.1, emotion@^9.1.2, emotion@^9.1.3:
45554622
version "9.2.12"
45564623
resolved "https://packages.atlassian.com/api/npm/npm-remote/emotion/-/emotion-9.2.12.tgz#53925aaa005614e65c6e43db8243c843574d1ea9"
45574624
dependencies:

0 commit comments

Comments
 (0)