question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

assets added through css/sass won't load in production

See original GitHub issue

I have the following code in my css:

.pic{
	background-image: url('@/assets/img/test.png');
	width: 200px;
	height: 200px;
}

it works fine while running the app in development mode, but in production the image was missing. Same happens with fonts:

@font-face {
	font-family: 'Input Mono Narrow';
	src: url('@/assets/fonts/InputMonoNarrowBold.woff2') format('woff2'), url('@/assets/fonts/InputMonoNarrowBold.woff') format('woff');
	font-weight: bold;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Input Mono';
	src: url('@/assets/fonts/InputMonoNarrowRegular.woff2') format('woff2'), url('@/assets/fonts/InputMonoNarrowRegular.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

Ideas?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
wuql576commented, Mar 25, 2022

Try change protocol.registerSchemesAsPrivileged([ { scheme: 'app', privileges: { secure: true, standard: true } } ]) to protocol.registerSchemesAsPrivileged([ { scheme: 'app', privileges: { secure: true} } ]) in your background.js

0reactions
MatthijsBurghcommented, Jul 4, 2022

Seems that this issue is solved by the solution provided by @wuql576

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rails assets not compiling when pushing to production
Rails.application.config.assets.precompile += %w( *.css.sass ) ... I had a similar issue and had to use 2.11.0 to get it to work correctly.
Read more >
Webpack 5 CSS Walkthrough: Sass, PostCSS and more!
This includes basic CSS, SASS, PostCSS with fallbacks and autoprefixer plugins, Injected inline styles vs css files for output, and a quick ...
Read more >
React (Babel) and Sass webpack Tutorial: Extract CSS Into Its ...
Let's learn how to setup Babel, React, JSX, CSS, Sass and more with webpack!0:00 Intro1:27 Getting Started6:19 Loaders in webpack15:26 ...
Read more >
css.md - Webpacker Docs
Webpacker supports importing CSS, Sass and SCSS files directly into your JavaScript files. Importing and loading styles is a two step process:.
Read more >
Getting JavaScript to Talk to CSS and Sass
We can set the value of a custom property using setProperty : ... that it will work in local development mode but then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found