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(forge): introduce webpack plugin and remove parcel #1109

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

aryanshridhar
Copy link
Collaborator

@aryanshridhar aryanshridhar commented Jun 16, 2022

Introduces forge+webpack configuration and removes parcel for the bundling process.

Errors

Active

None

Fixed

  • Logs from terminal - (Resolved ✅)
Compiling Renderer Code(node:14230) UnhandledPromiseRejectionWarning: ReferenceError: __importStar is not defined
    at /Users/aryanshridhar/Desktop/fiddle/.webpack/main/index.js:45171:62
    at async onReady (/Users/aryanshridhar/Desktop/fiddle/.webpack/main/index.js:45171:27)
(Use `Electron --trace-warnings ...` to show where the warning was created)
(node:14230) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
ReferenceError: require is not defined
    at webpack/runtime/compat:2:49

for all packages.

An unhandled exception has occurred inside Forge:
Cannot read properties of undefined (reading 'close')
TypeError: Cannot read properties of undefined (reading 'close')
    at WebpackPlugin.exitHandler (/Users/aryanshridhar/Desktop/fiddle/node_modules/@electron-forge/plugin-webpack/src/WebpackPlugin.ts:83:16)
    at process.<anonymous> (/Users/aryanshridhar/Desktop/fiddle/node_modules/@electron-forge/plugin-webpack/src/WebpackPlugin.ts:126:40)
    at process.emit (node:events:402:35)
    at process.emit (/Users/aryanshridhar/Desktop/fiddle/node_modules/source-map-support/source-map-support.js:516:21)
    at process.emit (/Users/aryanshridhar/Desktop/fiddle/node_modules/@electron-forge/core/node_modules/source-map-support/source-map-support.js:495:21)
    at processEmit [as emit] (/Users/aryanshridhar/Desktop/fiddle/node_modules/signal-exit/index.js:155:35)
    at process.exit (node:internal/process/per_thread:184:15)
    at WebpackPlugin.exitHandler (/Users/aryanshridhar/Desktop/fiddle/node_modules/@electron-forge/plugin-webpack/src/WebpackPlugin.ts:93:31)
    at process.<anonymous> (/Users/aryanshridhar/Desktop/fiddle/node_modules/@electron-forge/plugin-webpack/src/WebpackPlugin.ts:127:62)
    at process.emit (node:events:402:35)
    at process.emit (/Users/aryanshridhar/Desktop/fiddle/node_modules/source-map-support/source-map-support.js:516:21)
  • Figure out the best way to handles assets. (Resolved ✅)
  • Fonts not being read and rendered properly. (Resolved ✅)
  • CSP is blocking some requests - (Resolved ✅)
instrument.js:136 Refused to connect to 'https://releases.electronjs.org/releases.json' because it violates the following Content Security Policy directive: "default-src 'self' 'unsafe-inline' data:". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
  • Failing jest tests - (Resolved ✅)

@aryanshridhar aryanshridhar force-pushed the Remove-ParcelBundler branch 4 times, most recently from 9cf5ff4 to 033d13e Compare June 22, 2022 10:04
@dsanders11 dsanders11 changed the title forge: introduce webpack plugin and remove parcel build(forge): introduce webpack plugin and remove parcel Jun 22, 2022
@coveralls
Copy link

coveralls commented Jun 23, 2022

Coverage Status

Coverage decreased (-0.2%) to 92.792% when pulling 851e728 on Remove-ParcelBundler into 101adf7 on main.

forge.config.js Outdated Show resolved Hide resolved
@dsanders11 dsanders11 marked this pull request as draft June 26, 2022 21:52
src/main/windows.ts Outdated Show resolved Hide resolved
@aryanshridhar aryanshridhar force-pushed the Remove-ParcelBundler branch 4 times, most recently from 32791e3 to 0ce9fb9 Compare June 29, 2022 11:58
src/renderer/templates.ts Outdated Show resolved Hide resolved
src/renderer/components/settings-credits.tsx Outdated Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
forge.config.js Outdated Show resolved Hide resolved
@aryanshridhar aryanshridhar force-pushed the Remove-ParcelBundler branch 4 times, most recently from 2a3c793 to 04a0eb0 Compare June 30, 2022 12:02
@dsanders11 dsanders11 self-requested a review July 5, 2022 13:26
@aryanshridhar aryanshridhar force-pushed the Remove-ParcelBundler branch 2 times, most recently from 07a3cbe to 6c21704 Compare July 5, 2022 15:54
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>
Co-authored-by: BlackHole1 <158blackhole@gmail.com>
@aryanshridhar aryanshridhar marked this pull request as ready for review July 5, 2022 16:31
Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for working through all the issues here. 🙂

Comment on lines +31 to +36
- name: Create fake contributors
uses: 1arp/create-a-file-action@0.2
with:
path: 'static'
file: 'contributors.json'
content: "[]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding a note here to investigate why tests/globalSetup.js doesn't work for CI for creating this file. 👍

Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

@VerteDinde VerteDinde merged commit 0ba78af into main Jul 11, 2022
@VerteDinde VerteDinde deleted the Remove-ParcelBundler branch July 11, 2022 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants