-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A little bit of maintenance on the ReasonML examples #11662
A little bit of maintenance on the ReasonML examples #11662
Conversation
scull7
commented
Apr 4, 2020
•
edited
Loading
edited
- update the todo example to the latest bs-platform
- add the babel-types package to both examples to fix the next compiler complaint.
- remove extraneous babel-plugin-bucklescript dependency.
`next dev` was failing with: ``` Error: Cannot find module 'babel-types' ```
Also add the `babel-types` package to stop the `next dev` command from complaining.
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless Mode (Increase detected
|
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
buildDuration | 9.6s | 9.7s | |
nodeModulesSize | 47.7 MB | 47.7 MB | ✓ |
Client Bundles (main, webpack, commons)
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
main-HASH.js gzip | 6.25 kB | 6.25 kB | ✓ |
webpack-HASH.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..5272.js gzip | 10.2 kB | 10.2 kB | ✓ |
framework.HASH.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 56.3 kB | 56.3 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
main-HASH.module.js gzip | 4.78 kB | 4.78 kB | ✓ |
webpack-HASH..dule.js gzip | 746 B | 746 B | ✓ |
de003c3a9d30..dule.js gzip | 6.75 kB | 6.75 kB | ✓ |
framework.HA..dule.js gzip | 39.1 kB | 39.1 kB | ✓ |
Overall change | 51.4 kB | 51.4 kB | ✓ |
Legacy Client Bundles (polyfills)
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 26.3 kB | 26.3 kB | ✓ |
Overall change | 26.3 kB | 26.3 kB | ✓ |
Client Pages
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
_app.js gzip | 1.24 kB | 1.24 kB | ✓ |
_error.js gzip | 3.15 kB | 3.15 kB | ✓ |
hooks.js gzip | 664 B | 664 B | ✓ |
index.js gzip | 222 B | 222 B | ✓ |
link.js gzip | 2.03 kB | 2.03 kB | ✓ |
routerDirect.js gzip | 279 B | 279 B | ✓ |
withRouter.js gzip | 278 B | 278 B | ✓ |
Overall change | 7.86 kB | 7.86 kB | ✓ |
Client Pages Modern
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
_app.module.js gzip | 594 B | 594 B | ✓ |
_error.module.js gzip | 2.08 kB | 2.08 kB | ✓ |
hooks.module.js gzip | 370 B | 370 B | ✓ |
index.module.js gzip | 212 B | 212 B | ✓ |
link.module.js gzip | 1.48 kB | 1.48 kB | ✓ |
routerDirect..dule.js gzip | 271 B | 271 B | ✓ |
withRouter.m..dule.js gzip | 270 B | 270 B | ✓ |
Overall change | 5.28 kB | 5.28 kB | ✓ |
Client Build Manifests
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
_buildManifest.js gzip | 61 B | 61 B | ✓ |
_buildManife..dule.js gzip | 61 B | 61 B | ✓ |
Overall change | 122 B | 122 B | ✓ |
Serverless bundles Overall increase ⚠️
zeit/next.js canary | scull7/next.js scull7/update-reasonml-todo-to-latest-bucklescript | Change | |
---|---|---|---|
_error.js gzip | 233 kB | 233 kB | -292 B |
404.html gzip | 1.32 kB | 1.32 kB | ✓ |
hooks.html gzip | 956 B | 956 B | ✓ |
index.js gzip | 233 kB | 233 kB | |
link.js gzip | 243 kB | 243 kB | |
routerDirect.js gzip | 241 kB | 241 kB | |
withRouter.js gzip | 241 kB | 241 kB | |
Overall change | 1.19 MB | 1.19 MB |
Failing test suitestest/integration/preload-viewport/test/index.test.js
Expand output● Prefetching Links in viewport › should not have unhandledRejection when failing to prefetch on link
|
@@ -19,7 +19,8 @@ | |||
}, | |||
"devDependencies": { | |||
"@babel/core": "^7.4.3", | |||
"bs-platform": "5.0.3", | |||
"babel-types": "6.26.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this one needed? babel-types
is the Babel 6 version of it's types 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.dropbox.com/s/49en6itmq3nwmiw/Screenshot%202020-04-05%2014.20.25.png?dl=0
Seems that it has to do with the Bucklescript babel plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following occurs when I remove the babel-plugin-bucklescript
from the package.json file.
[ error ] ./node_modules/next/dist/client/next-dev.js │
Error: Cannot find module 'babel-plugin-bucklescript' from '/Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo' │
at Array.map (<anonymous>) │
Error: Cannot find module '/Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo/.next/server/static/development/pages/_document' │
Require stack: │
- /Users/nathansculli/src/scull7/next.js/examples/with-reasonml-todo/node_modules/next/dist/next-server/server/load-components.js
I don't know enough about the next.js dev server to understand why it's trying to load the plugin. I've used ripgrep to search the entire node_modules folder and can't find any reference to the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mike-engel/babel-plugin-bucklescript#7
Seems that the babel-plugin-bucklescript has been archived and that it's got an implicit dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that I'm not very smart. I didn't realize that the babel-plugin-bucklescript
dependency was coming from the .babelrc file 🤦♂ . I removed that dependency and the associated babel-types
dependency and now all is well.
I pulled it in because `next dev` complained about it missing. I tried
from a clean repo chieckout.
On Sun, Apr 5, 2020 at 04:54 Tim Neutkens ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In examples/with-reasonml-todo/package.json
<#11662 (comment)>:
> @@ -19,7 +19,8 @@
},
"devDependencies": {
***@***.***/core": "^7.4.3",
- "bs-platform": "5.0.3",
+ "babel-types": "6.26.0",
Why is this one needed?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11662 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABZG4FTM5GS5YT36AO6LPTRLBWPZANCNFSM4L6K3GCA>
.
--
Ciao,
Nathan Sculli
|
Seems the dependency has been deprecated, and it doesn't seem to be required anyways.
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless Mode (Decrease detected ✓)General
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Legacy Client Bundles (polyfills)
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles Overall decrease ✓
|
Interesting, will merge for now. Thanks! |