Questions tagged [sass-loader]

435 questions
0
votes
1 answer

Webpack 1 + sass (in react) - leave my images alone

I have a project in React.js with SASS and using Webpack 1. I have images folders with all the images and other assets' folders. I do not want webpack to do anything with images, I want them to be loaded at the runtime by url. I solved it in JSX by…
xims
  • 1,570
  • 17
  • 22
0
votes
1 answer

How to add sass-loader with Webpack 1?

I recently ejected my create-react-app because I need to load sass files. Unfortunately, create-react-app uses webpack 1. But, the current version of sass-loader includes a dependency on webpack 2. The support docs don't indicate the last…
lgants
  • 3,665
  • 3
  • 22
  • 33
0
votes
1 answer

How to webpack sass inline variables #{$i}

I'm trying something like: @for $i from 0 through 5 { .foo-#{$i} { padding-left: 16px * $i; } } I get the following error: CssSyntaxError: app/styles.scss:41:11: Unknown word You tried to parse SCSS with the standard CSS parser;…
leeodelion
  • 151
  • 6
0
votes
0 answers

webpack sass-loader and webpack-dev-server

I would like webpack.config.js to convert scss to css and start dev server. I can do them individually its works perfectly. "use strict"; const path = require("path"); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const…
Naresh217
  • 410
  • 1
  • 6
  • 19
0
votes
1 answer

unable to generate CSS file sass-loader webpack

I am trying to use sass-loader to convert SCSS files to css(Required to have physical file). Styles are getting applied but unable to see generated .css files . //webpack.config.js var ExtractTextPlugin =…
Naresh217
  • 410
  • 1
  • 6
  • 19
0
votes
2 answers

sass-loader not working with webpack + react + grommet

I'm trying to get started with webpack and Grommet working together. I'm following this tutorial: https://github.com/grommet/grommet-standalone but I'm getting the following error: ERROR in ./src/app/index.js Module not found: Error: Can't resolve…
John Devitt
  • 690
  • 2
  • 8
  • 22
0
votes
2 answers

Failing to load background-image with sass-loader (Webpack)

I'm having trouble trying to get the browser to successfully find a background image whilst using webpack and sass-loader/style-loader/css-loader. The path seems to be right, because whenever I change it the compile process fails, but as it is, it…
Paulos3000
  • 3,355
  • 10
  • 35
  • 68
0
votes
1 answer

Error implementing sass-loader webpack

I am currently trying to get sass working with my webpack application. I have had success with configuring style-loader & css-loader. However, when I try and implement sass-loader I receive the following error: bundle.js:598 Uncaught Error: Cannot…
Nappstir
  • 995
  • 2
  • 20
  • 38
0
votes
1 answer

Using webpack-dev-server, How can I convert multiple scss files to single css file? It breaks on "@import"

When I run webpack-dev-server --config webpack.config.json I get the following error: @import "modules/colors"; ^ SyntaxError: Unexpected token ILLEGAL at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:513:28) …
0
votes
1 answer

SCSS @import's processing order with webpack

The webpack is configured with sass-loader module to process .scss files. Here is the chunk from config file: { test: /\.scss$/, loaders: ["react-hot", "style", "css?sourceMap&-minimize", "autoprefixer-loader?safe=true", "sass?sourceMap"] …
boldnik
  • 2,547
  • 2
  • 27
  • 32
0
votes
1 answer

Webpack: load background images in scss file not showing

I try to use webpack sass-loader to load a .scss file which contains background images. Part of the .scss is like .clouds_two { background: url(require("../../../images/cloud_two.png")); //no error, just not display //background:…
Bing Lu
  • 3,232
  • 7
  • 30
  • 38
0
votes
1 answer

Webpack and sass

I'm having issues loading in my scss files with webpack. I get this error: Module build failed: @import 'bulma'; ^ Invalid CSS after "...load the styles": expected 1 selector or at-rule, was "content = requi..." This is my webpack config…
Dileet
  • 2,034
  • 3
  • 33
  • 53
0
votes
0 answers

webpack fails to build due to different directory

I am trying out this boilerplate https://github.com/opencredo/opencredo-react-boilerplate and it works fine if a project is located in: "/Users/[my_home]/oc/adminUI" But if I move this boilerplate into my other project's subdirectory with path…
Deforciant
  • 51
  • 3
0
votes
2 answers

Webpack only generates JS, no CSS file from SCSS

In my project I use Webpack with React and NodeJS. I want to generate a bundle.js and style.css file. Currently I've got the following code: var webpack = require('webpack') var ExtractTextPlugin =…
ronnyrr
  • 1,481
  • 3
  • 26
  • 45
-1
votes
3 answers

Sass loader can't load url with Encore webpack and Symfony 5

I updated Encore webpack and its dependencies. Since, I have this error : Error: Can't resolve '/fonts/Basier-Circle-medium-webfont/basiercircle-medium-webfont.woff' in 'E:\Projets web\Roadtripr\roadtripr\assets\css' at runMicrotasks () The…
1 2 3
28
29