Skip to content
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

7d shows an old version of a webpack compiled main.js #3153

Open
bambery opened this issue Sep 27, 2023 · 3 comments
Open

7d shows an old version of a webpack compiled main.js #3153

bambery opened this issue Sep 27, 2023 · 3 comments

Comments

@bambery
Copy link
Contributor

bambery commented Sep 27, 2023

Both times the text says something like The definition of the transformed App component looks like this, the code given is out of date. In 2023, the output looks something like this:
var App = function App() {\n return /*#__PURE__*/react_ _WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", null, \"hello webpack\");\n};

It doesn't have bearing on the point the material is trying to make, but it was confusing when I'm attempting to find code in my app that isn't there. I'll make a PR for this when I am finished with this section.

Note to self: check other language versions to see if there is a better translation of the paragraph that begins: "It's worth noting that if the bundled application's source code uses async/await". I had to read that paragraph about five times to try and understand what it was attempting to say in English.

Note 2: the "source maps" example is out of date: the error thrown is now the more clear: "values is undefined". The rest of the example still works.

Note 3: try to repeat the steps up to "minify" again in a fresh repo and see if this occurs again: the shown example is able to uglify main.js, but the example (from 2019?) does not surpass the 244 kib warning limit for webpack. The tutorial, as followed last night, does cross that threshold (clocking in at 329 kib), and causes two warning messages to appear when building:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  main.js (329 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (329 KiB)
      main.js
@mluukkai
Copy link
Contributor

It's worth noting that if the bundled application's source code uses async/await, the browser will not render anything on some browsers. tries to say

if there is async/await in the source code, the transpiled code does not work on old browsers

@bambery
Copy link
Contributor Author

bambery commented Sep 27, 2023

It's worth noting that if the bundled application's source code uses async/await, the browser will not render anything on some browsers. tries to say

if there is async/await in the source code, the transpiled code does not work on old browsers

Thanks, I understand this now! However, what confused is that the wording treats the ongoing code example as though it did have async/await, and references "Googling the error message in the console." However, "the" error does not appear for me when following the tutorial. Rewording it to make it clear the error would be expected, but is not expected right now, would be helpful.

I'll submit a second PR for that change as it is not about content as much as word choice.

@mluukkai
Copy link
Contributor

mluukkai commented Sep 27, 2023

You are quite right! This needs to be (and will be) improved, thanks for pointing this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants