sass-loader

sass-loader not working with webpack + react + grommet

孤街醉人 提交于 2019-12-12 01:14:24
问题 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 'grommet/scss/vanilla/index' in '/home/john/Development/Work/Utilities/react_practice/test_app/src/app' @ ./src/app/index.js 31:0-37 @ multi library Clearly it's looking for the scss file files in the source directory rather than node_modules - but

Compass “box-shadow” mixin returns Invalid property value

做~自己de王妃 提交于 2019-12-11 10:17:29
问题 For some reason box-shadow mixin returns value that is considered Invalid by browser. Why does it happen? How to fix? In my .scss : @import "compass/css3/box-shadow"; @include box-shadow(0px 1px 5px 1px #c4c3c3); Returns this: -webkit-box-shadow: compact(0px 1px 5px 1px #c4c3c3, false, false, false, false, false, false, false, false, false); -moz-box-shadow: compact(0px 1px 5px 1px #c4c3c3, false, false, false, false, false, false, false, false, false); box-shadow: compact(0px 1px 5px 1px

Webpack 2 sass-loader Unexpected character '@'

試著忘記壹切 提交于 2019-12-11 08:49:33
问题 i have the next webpack 2 rules configuration when run webpack throwed the next error: Unexpected character '@' (1:0) You may need an appropriate loader to handle this file type. | @media screen and (min-width: 40em) { | .feature { | margin-bottom: 8.75rem; @ ./~/style-loader?{"camelCase":true,"localIdentName":"[name]_[local]_[hash:base64:3]","modules":true}!./~/postcss-loader!./~/resolve-url-loader!./~/sass-loader?{"sourceMap":true,"outputStyle":"expanded","include":["/opt/inmoblex/current

How to pre-load SASS custom utilities (variables and mixins) with webpack

♀尐吖头ヾ 提交于 2019-12-11 00:22:29
问题 I am loading my utilities and assets in base.scss like so @import "_variables"; @import "_mixins"; ... I have tons of modules in my application and we are doing so many changes in these modules. so importing the base.scss in the header of each of the scss files is causing so much trouble and seems very redundant. I tried using sass's includePaths but it didn't help as it only resolves the @import declarations. Is there any way that I can auto import my utilities without having to @import it

Sass loader hangs compilation

≯℡__Kan透↙ 提交于 2019-12-10 15:38:44
问题 I am using webpack version 2.2.0 and sass-loader 4.4.1, and @angular/core is 2.4.4 when I run the command : npm run serve it make hang command prompt on 62% sometimes 61% or 63%. Here below id dev dependencies of package.json: "devDependencies": { "@types/core-js": "0.9.35", "@types/googlemaps": "3.26.2", "@types/node": "6.0.60", "@types/uglify-js": "2.0.27", "angular2-template-loader": "0.4.0", "awesome-typescript-loader": "2.2.4", "copy-webpack-plugin": "3.0.1", "css-loader": "0.25.0",

NuxtJS & SASS Loader - Build with sass-loader (SCSS) on production

我是研究僧i 提交于 2019-12-06 11:22:44
I've added this lines to build with sass-loader on development (local) server: nuxt.config.js module.exports = { mode: 'spa', build: { analyze: { analyzerMode: 'static', generateStatsFile: true, statsFilename: 'webpack-stats.json', openAnalyzer: false }, vendor: [ 'axios', 'vuetify' ], extend (config) { config.resolve.alias['vue'] = 'vue/dist/vue.common' const vueLoader = config.module.rules.find((rule) => rule.loader === 'vue-loader') vueLoader.options.loaders.scss = 'vue-style-loader!css-loader!sass-loader?' + JSON.stringify({ includePaths: [ path.resolve(__dirname), 'node_modules' ] }) } }

Webpack: Generate multiple css files from the same sources

▼魔方 西西 提交于 2019-12-06 04:24:22
问题 I'm trying to generate 2 different CSS files from the same SCSS sources with webpack 2, in order to have alternate stylesheets without duplicating code. I've successfully generated both sheets separately by commenting one out, but can't figure out how to generate them at the same time. My webpack config (shortened for relevance) is: const ExtractTextPlugin = require("extract-text-webpack-plugin"); const CopyWebpackPlugin = require('copy-webpack-plugin'); const webpack = require('webpack');

Webpack: Generate multiple css files from the same sources

跟風遠走 提交于 2019-12-04 09:05:38
I'm trying to generate 2 different CSS files from the same SCSS sources with webpack 2, in order to have alternate stylesheets without duplicating code. I've successfully generated both sheets separately by commenting one out, but can't figure out how to generate them at the same time. My webpack config (shortened for relevance) is: const ExtractTextPlugin = require("extract-text-webpack-plugin"); const CopyWebpackPlugin = require('copy-webpack-plugin'); const webpack = require('webpack'); const path = require('path'); const ExtractLightCss = new ExtractTextPlugin("app-light.css") const

Sass loader and webpack 4

怎甘沉沦 提交于 2019-12-03 09:43:14
问题 How to use sass loader with webpack 4? I read a lot about this and most sites recomended to use ExtractTextPlugin, but ExtractTextPlugin doesn't work with webpack 4. I wrote following webpack.config.js : const path = require('path'); const ClosureCompilerPlugin = require('webpack-closure-compiler'); module.exports = { module: { rules: [ { test: /\.scss$/, use: [{ loader: "style-loader" }, { loader: "css-loader" }, { loader: "sass-loader" }] } ] }, plugins: [ new ClosureCompilerPlugin({

Why am I not being able to compile SASS with Webpack?

杀马特。学长 韩版系。学妹 提交于 2019-11-30 03:27:36
I have the following modules in my Webpack config: module: { preLoaders: [ { test: /\.vue$/, loader: 'eslint', include: projectRoot, exclude: /node_modules/ }, { test: /\.js$/, loader: 'eslint', include: projectRoot, exclude: /node_modules/ } ], loaders: [ { test: /\.vue$/, loader: 'vue' }, { test: /\.js$/, loader: 'babel', include: projectRoot, exclude: /node_modules/ }, { test: /\.json$/, loader: 'json' }, { test: /\.html$/, loader: 'vue-html' }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, loader: 'url', query: { limit: 10000, name: utils.assetsPath('img/[name].[hash:7].[ext]') } }, { test: /\