-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Remove file-loader from webpack-resolver #221
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to use patch-package ace-builds+1.4.13.patch
|
6 tasks
undergroundwires
added a commit
to undergroundwires/privacy.sexy
that referenced
this pull request
Dec 31, 2021
Upgrade to v5.x using `vue upgrade --next`. Update `vue.config.js` to import and use `defineConfig`, because it provides type safety and created by Vue CLI 5 as default. Vue CLI 5.x upgrades from webpack 4 to 5. It causes some issues that this commit attemps to fix: 1. Fail due to webpack resolving of Ace. Third-party dependency (code editor) Ace uses legacy `file-loader` for webpack resolving. It's not supported in webpack 5. So change it with manual imports. Refs: ajaxorg/ace-builds#211, ajaxorg/ace-builds#221. 2. Wehpack drops polyfilling node core modules (`path`, `fs`, etc.). Webpack does not polyfill those modules by default anymore. This is good because they did not need browser polyfilling as they are used in desktop version only and resolved already by Electron. To resolve errors (using webpack recommendations): - Add typeof check around `process` variable. - Tell webpack explicitly to ignore used node modules. 3. Fail due to legacy dependency of vue-cli-plugin-electron-builder. This plugin is used for electron builds and development. It still uses webpack 4 that leads to failed builds. Downgrading `ts-loader` to latest version which has support for `loader-utils` solves the problem (TypeStrong/ts-loader#1288). Related issue: nklayman/vue-cli-plugin-electron-builder#1625 4. Compilation fails due to webpack loading of `fsevents` on macOS. This happens only when running `vue-cli-service test:unit` command (used in integration tests and unit tests). Other builds work fine. Refs: yan-foto/electron-reload#71, nklayman/vue-cli-plugin-electron-builder#712, nklayman/vue-cli-plugin-electron-builder#1333
Hi, any updates on this? |
Any update on getting this merged in? |
Unfortunately this seems to break webpack 4, so we can't merge this directly, but we are adding esm loader which will work with all modern bundlers ajaxorg/ace#5070 |
the new esm-resolver is included in v1.15.3 |
LarrMarburger
pushed a commit
to LarrMarburger/privacy.sexy
that referenced
this pull request
Nov 16, 2023
Upgrade to v5.x using `vue upgrade --next`. Update `vue.config.js` to import and use `defineConfig`, because it provides type safety and created by Vue CLI 5 as default. Vue CLI 5.x upgrades from webpack 4 to 5. It causes some issues that this commit attemps to fix: 1. Fail due to webpack resolving of Ace. Third-party dependency (code editor) Ace uses legacy `file-loader` for webpack resolving. It's not supported in webpack 5. So change it with manual imports. Refs: ajaxorg/ace-builds#211, ajaxorg/ace-builds#221. 2. Wehpack drops polyfilling node core modules (`path`, `fs`, etc.). Webpack does not polyfill those modules by default anymore. This is good because they did not need browser polyfilling as they are used in desktop version only and resolved already by Electron. To resolve errors (using webpack recommendations): - Add typeof check around `process` variable. - Tell webpack explicitly to ignore used node modules. 3. Fail due to legacy dependency of vue-cli-plugin-electron-builder. This plugin is used for electron builds and development. It still uses webpack 4 that leads to failed builds. Downgrading `ts-loader` to latest version which has support for `loader-utils` solves the problem (TypeStrong/ts-loader#1288). Related issue: nklayman/vue-cli-plugin-electron-builder#1625 4. Compilation fails due to webpack loading of `fsevents` on macOS. This happens only when running `vue-cli-service test:unit` command (used in integration tests and unit tests). Other builds work fine. Refs: yan-foto/electron-reload#71, nklayman/vue-cli-plugin-electron-builder#712, nklayman/vue-cli-plugin-electron-builder#1333
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
ace-builds does not work without
file-loader
installed if webpack-resolver is being used.Description of changes:
Changed webpack-resolver as explained in ajaxorg/ace#4744
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.