Questions tagged [resolve-url-loader]

22 questions
24
votes
6 answers

Node Error: resolve-url-loader: CSS error

I am trying to run a react project as dev server on my surface, and if gives me the error shown below and in the title. When I am running the same config on my pc I am not having this problem. (I tried creating the same conditions, but it just wont…
Maxdola
  • 1,562
  • 2
  • 10
  • 29
22
votes
7 answers

CSS error source-map information is not available at URL() declaration (found orphan CR, try removeCR option)

I am having a problem when I execute NPM start in my project. I get this error message: ./src/assets/base.scss…
14
votes
3 answers

Webpack 4 with sass-loader & resolve-url-loader - Image paths not being found

Minimally reproducible setup here: https://github.com/jamesopti/webpack_playground/tree/resolve_url_loader_issue Im trying to use resolve-url-loader to add a hashname to my scss url() image paths, but I'm having a heck of a time getting it to work…
jamis0n
  • 3,610
  • 8
  • 34
  • 50
4
votes
2 answers

Correct way to include image via relative path

I've updated laravel-mix to version 4.0.12 and faced with broken build on the line in *.scss where I used a relative path to include background image I got a next files…
Pavlo Zhukov
  • 3,007
  • 3
  • 26
  • 43
3
votes
1 answer

Webpack - different font path for build and production css in the less-loader

I'm trying to create an CSS from LESS with webpack. My source folder have following hierarchy: fonts desyrel desyrel_-webfont.woff less ds-handwritten.less Content of less file include relative font path, which will be used in the…
3
votes
0 answers

SCSS How to load style url references relative to source files (Error: relative modules were not found)

first of all thank you for any help, you are awesome. I am struggling with this setup to make url referenced resources from scss work correctly. I mean to load by webpack and make them work in development environment and in production too. We have…
Luckylooke
  • 4,061
  • 4
  • 36
  • 49
3
votes
2 answers

vue.js cli project not loading local fonts

There seems to be many issues around loading fonts on vue.js projects, I am using a webpack build and my build/webpack.base.conf.js URL loader looks as follows: { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, loader: 'url-loader', …
HGB
  • 2,157
  • 8
  • 43
  • 74
2
votes
0 answers

Webpack: Error: resolve-url-loader: error processing CSS

Goal: To reduce the SSR compilation time, we have moved the import of node_modules style files from JS files to CSS files. Example: import 'react-multi-email/style.css'; => remove from .js file @import '~react-multi-email/style.css'; => add to .css…
2
votes
2 answers

Using Tailwind Arbitrary Value Support with SCSS

How to use the new TailwindCSS Arbitrary Value Support with SCSS modules in Next.js? The following code's CSS version was working well, but the SCSS version is throwing error: // styles/foo.module.scss .foo { @apply text-[#0e407c]; } //…
brc-dd
  • 10,788
  • 3
  • 47
  • 67
1
vote
0 answers

How do you effectively solve node module issues when google isn't providing many answers?

I received this issue and google isn't providing many case-specific examples to work from. Can anyone decode this? I am not really sure what the main issue is. I have followed the file path of the first issue to cjs.js file but there isn't much…
Bryan F
  • 49
  • 4
1
vote
0 answers

Error during bundle: Error: Unexpected character '' (Note that you need plugins to import files that are not JavaScript)

I added font to react typescript project after that I try to build but its showing error Error during bundle: Error: Unexpected character '' (Note that you need plugins to import files that are not JavaScript) Adding font using styled-components…
1
vote
1 answer

SassError: Can't find stylesheet to import. (not from node_modules) (using mochapack)

Attempting to load SCSS files from the relative path within Vue component fails. Config details: Using "mochapack": "^2.1.2", Using "sass-loader": "^10.2.0", Using $ node -v v14.17.0 webpack.config-test.js: const nodeExternals =…
Philll_t
  • 4,267
  • 5
  • 45
  • 59
1
vote
1 answer

Vite with url-loader

I need to handle GLTF and HDR files in my Vue/Three.js application. This doesn't work out of the box with Vite. With Webpack I can set this in the Webpack config module.exports = { module: { rules: [ { test: /\.(gltf)$/i, …
Robin-Whg
  • 263
  • 4
  • 14
1
vote
1 answer

Webpack: How to rewrie URL in .css

For 3 days straight I am having a trouble to setup Webpack for staging purposes. The goal is to rewrite url of assets in final .css file (frontend.css) like this: Let's say that in .scss file I have: background: url('/assets/image.png') (this works…
1
vote
0 answers

Unable to properly webpack build scss file containing relative url() references without placing main file in 3rd party library directory

Not exactly sure how to phrase this, so bear with me. I'm having url() relative path problems during the build of a scss file, while using a 3rd party theme (PrimeVue) together with my webpack setup. Each time I run the webpack build, it fails…
redfox05
  • 3,354
  • 1
  • 34
  • 39
1
2