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

Fix: upgrade babel eslint & vue-cli electron dependancies. #299

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

joshJarr
Copy link

@joshJarr joshJarr commented Nov 8, 2022

Hi,

When working with the electron app we noticed ES2020 was not being compiled correctly. Features such as optional chaining were throwing compilation errors as the loader for these files were outdated. This was also the case for files imported from node_modules meaning any library that used this modern JS syntax would not compile.

To fix this we updated the vue-cli-plugins and noticed that babel-eslint is deprecated, so updated this to use @babel/eslint-parser.

This had a side effect of also upgrading webpack to version 5+.
Webpack 5+ no longer polyfills node.js modules, this caused a few errors across the frontend so we added node-polyfill-webpack-plugin to ensure these necessary modules were available in the frontend.

A side effect of bumping the babel and vue-cli versions were that automated linting occurred when building and serving the electron app blocking compilation. To get around this we added a temporary .eslintignore file to discard these complaints for now.

TLDR: This PR updates the vue-cli and babel/eslint dependancies so that they are able to compile JS files and modules that use modern ES2020 syntax, aligning with the vue (.vue) file loader.

Let us know if you have any feedback,
Thanks!

@joshJarr joshJarr changed the title Fix/upgrade babel eslint Fix: upgrade babel eslint & vue-cli electron dependancies. Nov 8, 2022
@joshJarr joshJarr force-pushed the fix/upgrade_babel-eslint branch 2 times, most recently from 3c03c4c to a6b7668 Compare November 21, 2022 14:10
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

Successfully merging this pull request may close these issues.

None yet

1 participant