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

build: Wrap bundles using webpack #25557

Merged
merged 5 commits into from Oct 20, 2020

Conversation

@juliekoubova
Copy link
Contributor

@juliekoubova juliekoubova commented Sep 21, 2020

Description of Change

Moved the run-compiler.js and get-outputs.js logic directly into webpack. This way, the source mappings for bundles—when enabled—are not offset by the number of lines of the try...catch & profiling wrappers.

Checklist

Release Notes

Notes: none

@welcome
Copy link

@welcome welcome bot commented Sep 21, 2020

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@MarshallOfSound MarshallOfSound self-requested a review Sep 21, 2020
@juliekoubova juliekoubova marked this pull request as ready for review Sep 22, 2020
@juliekoubova
Copy link
Contributor Author

@juliekoubova juliekoubova commented Sep 22, 2020

also, we could probably use production mode instead of development with TerserPlugin and manually disabled source mapping. unless there's a reason for that?

@MarshallOfSound
Copy link
Member

@MarshallOfSound MarshallOfSound commented Sep 22, 2020

also, we could probably use production mode instead of development with TerserPlugin and manually disabled source mapping. unless there's a reason for that?

I honestly don't remember why I did that, I think it's because initially we didn't have the minifier. Then we relealized it made everything faster 😆

As long as we can keep our custom terser settings then production mode might make sense here

@juliekoubova
Copy link
Contributor Author

@juliekoubova juliekoubova commented Sep 22, 2020

As long as we can keep our custom terser settings then production mode might make sense here

I'd rather do it in a separate PR, it does add some more things than just the already-overridden settings:

Sets process.env.NODE_ENV on DefinePlugin to value production. Enables FlagDependencyUsagePlugin,
FlagIncludedChunksPlugin, ModuleConcatenationPlugin, NoEmitOnErrorsPlugin, OccurrenceOrderPlugin,
SideEffectsFlagPlugin and TerserPlugin.
https://webpack.js.org/configuration/mode/

Also, is there a way to re-trigger the build-mac workflow? I'm think it might have just randomly timed out?

@codebytere codebytere merged commit 56d1faf into electron:master Oct 20, 2020
9 checks passed
9 checks passed
Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
lint Workflow: lint
Details
release-notes Release notes found
@welcome
Copy link

@welcome welcome bot commented Oct 20, 2020

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

@release-clerk release-clerk bot commented Oct 20, 2020

No Release Notes

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.