externals can not be removed even if experimentalNativeDepCheck is enabled
bruceauyeung opened this issue · comments
Bruce Auyeung commented
Describe the bug
the following error would rise when yarn build
if externals
being removed:
ERROR Failed to compile with 1 error17:23:27
error in ./node_modules/react-screenshots/dist/index.html
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <!doctype html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link href="css/app.c638c105275b2bc6ebc6.css" rel="stylesheet"></head><body><noscript><strong>很抱歉,没有JavaScript,网站不能正常工作。请启用JavaScript。</strong></noscript><div id="app"></div><script src="js/app.b2ecc57be74465245baf.js"></script></body></html>
@ ./node_modules/electron-screenshots/lib/screenshots.js 348:29-81
@ ./src/windowManager.ts
@ ./src/auth/uacAuth.ts
@ ./node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--15-3!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=ts&
@ ./src/App.vue?vue&type=script&lang=ts&
@ ./src/App.vue
@ ./src/main.ts
@ multi ./src/main.ts
ERROR Vue CLI build failed. Please resolve any issues with your build and try again.
related configurations:
externals: ['ffi-napi', 'ref-napi', 'sharp', 'electron-screenshots', 'mmap-io', 'shmmap', 'node-screenshots'],
experimentalNativeDepCheck: true,
To Reproduce
Steps to reproduce the behavior:
Expected behavior
externals
can be removed when experimentalNativeDepCheck
is enabled
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- custom config for vcp-electron-builder:
- (if possible) link to your repo:
- terminal output from running
vue info
:
Environment Info:
System:
OS: Windows 10 10.0.17763
CPU: (4) ia32 QEMU Virtual CPU version 2.5+
Binaries:
Node: 16.17.0 - C:\Program Files (x86)\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.15.0 - C:\Program Files (x86)\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Not Found
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.4.0
@vue/babel-helper-vue-transform-on: 1.0.2
@vue/babel-plugin-jsx: 1.1.1
@vue/babel-plugin-transform-vue-jsx: 1.4.0
@vue/babel-preset-app: 4.5.19
@vue/babel-preset-jsx: 1.4.0
@vue/babel-sugar-composition-api-inject-h: 1.4.0
@vue/babel-sugar-composition-api-render-instance: 1.4.0
@vue/babel-sugar-functional-vue: 1.4.0
@vue/babel-sugar-inject-h: 1.4.0
@vue/babel-sugar-v-model: 1.4.0
@vue/babel-sugar-v-on: 1.4.0
@vue/cli-overlay: 4.5.19
@vue/cli-plugin-babel: ^4.5.19 => 4.5.19
@vue/cli-plugin-eslint: ^4.5.19 => 4.5.19
@vue/cli-plugin-router: 4.5.19
@vue/cli-plugin-typescript: ^4.5.19 => 4.5.19
@vue/cli-plugin-unit-jest: ^4.5.19 => 4.5.19
@vue/cli-plugin-vuex: 4.5.19
@vue/cli-service: ^4.5.19 => 4.5.19
@vue/cli-shared-utils: 4.5.19 (5.0.8)
@vue/component-compiler-utils: 3.3.0 (3.1.1)
@vue/eslint-config-prettier: ^6.0.0 => 6.0.0
@vue/eslint-config-typescript: ^5.0.1 => 5.0.1
@vue/preload-webpack-plugin: 1.1.1
@vue/test-utils: ^1.1.3 => 1.3.0
@vue/web-component-wrapper: 1.2.0
babel-helper-vue-jsx-merge-props: 2.0.3
eslint-plugin-vue: ^6.1.2 => 6.2.1
jest-serializer-vue: 2.0.2
typescript: ~3.8.0 => 3.8.3
vue: ^2.6.10 => 2.6.10
vue-async-computed: ^3.8.2 => 3.8.2
vue-async-computed-decorator: ^0.0.4 => 0.0.4
vue-class-component: ^7.0.2 => 7.1.0
vue-cli-plugin-electron-builder: ^3.0.0-alpha.4 => 3.0.0-alpha.4
vue-eslint-parser: 7.0.0
vue-hot-reload-api: 2.3.4
vue-i18n: ^8.21.0 => 8.21.0
vue-jest: 3.0.7
vue-loader: 15.10.0 (16.8.3)
vue-property-decorator: ^8.3.0 => 8.3.0
vue-router: ^3.1.3 => 3.1.3
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.10 => 2.6.10
vue-template-es2015-compiler: 1.9.1
vuex: ^3.0.1 => 3.1.2
npmGlobalPackages:
@vue/cli: Not Found
Additional context
vcpeb: ^3.0.0-alpha.4
Matthijs van der Burgh commented
Have a look at #861. I don't have the time to take a look into it for now.