publicPath malformed for assets imported through CSS
See original GitHub issueVersion
5.0.0-alpha.7
Reproduction link
https://github.com/SnosMe/font-loading-bug
Environment info
Environment Info:
System:
OS: Linux 5.8 Ubuntu 20.10 (Groovy Gorilla)
CPU: (16) x64 AMD Ryzen 7 1700 Eight-Core Processor
Binaries:
Node: 14.4.0 - /tmp/fnm_multishell_1284112_1615510932578/bin/node
Yarn: 1.22.10 - /tmp/fnm_multishell_1284112_1615510932578/bin/yarn
npm: 7.5.3 - /tmp/fnm_multishell_1284112_1615510932578/bin/npm
Browsers:
Chrome: 89.0.4389.82
Firefox: 86.0
npmPackages:
@vue/cli-overlay: 4.5.11
@vue/cli-plugin-router: 4.5.11
@vue/cli-plugin-vuex: 4.5.11
@vue/cli-service: ^4.0.0 => 4.5.11
@vue/cli-shared-utils: 4.5.11
@vue/compiler-core: 3.0.7
@vue/compiler-dom: 3.0.7
@vue/compiler-sfc: ^3.0.4 => 3.0.7
@vue/compiler-ssr: 3.0.7
@vue/component-compiler-utils: 3.2.0
@vue/preload-webpack-plugin: 1.1.2
@vue/reactivity: 3.0.7
@vue/runtime-core: 3.0.7
@vue/runtime-dom: 3.0.7
@vue/shared: 3.0.7
@vue/web-component-wrapper: 1.3.0
vue: ^3.0.4 => 3.0.7
vue-cli-plugin-electron-builder: 2.0.0-rc.6 => 2.0.0-rc.6
vue-hot-reload-api: 2.3.4
vue-loader: 15.9.6 (16.1.2)
vue-style-loader: 4.1.3
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
Run yarn electron:build --dir
and launch executable in dist_electron/[PLATFORM]-unpacked/font-loading-bug(.exe)
. Open devtools console and see that the font failed to load because the request URL was app://fonts/...
instead of app://./fonts/...
.
What is expected?
The publicPath
is set to app://./
, so the font should be requested at app://./fonts/...
.
What is actually happening?
The ./
is removed and it is loaded from app://fonts/...
.
https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1286
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
configure webpack to use absolute path instead of relative path
It tries to fetch css/public/font/font1.ttf because the output CSS ... publicPath option and will add it to the beginning of the assets import...
Read more >Public Path - webpack
It allows you to specify the base path for all the assets within your application. Use Cases. There are a few use cases...
Read more >@roots/browserslist-config - NPM Package Versions - Socket
Start using Socket to analyze @roots/browserslist-config and its 0 dependencies to ... @roots/bud-extensions/copy-webpack-plugin | Copies assets (used by ...
Read more >webpack/webpack - Gitter
To sum up, this loader would read the locals generated by css-loader, ... 'src' in my tsconfig file to make it possible to...
Read more >Untitled
Ready to use blocks to configure popular tools like Babel, PostCSS, Sass, ... Best Practice: use the same publicPath defined in your webpack...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any update? @sodatea
A workaround, https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1286#issuecomment-987715223