Comments (8)
Hey :)
You got the order wrong. sass-vars-loader
needs come after sass
:
module: {
{
test: /\.scss$/,
loaders: ['style', 'css', 'resolve-url', 'sass?sourceMap', '@epegzz/sass-vars-loader'],
},
],
},
sassVars: {
vars: {
favouriteColor: 'red',
}
},
from sass-vars-loader.
I'm still getting the Undefined Variable
error, but there's also this new error:
main.scss:4Uncaught Error: Cannot find module "!!./../../node_modules/css-loader/index.js!./../../node_modules/resolve-url-loader/index.js!./../../node_modules/sass-loader/index.js?sourceMap!./../../node_modules/@epegzz/sass-vars-loader/index.js!./main.scss"
from sass-vars-loader.
Can you try and see what happens if you remove the resolve-url
? sass-vars-loader
does not use source maps at this point and thus might break resolve-url
which relies on it. I will look into implementing source-map support as soon as possible.
from sass-vars-loader.
Hmmm, I removed resolve-url
and switched to just sass
, but I'm still getting the same error.
Current COnfig:
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test : /\.css$/,
loaders: ['style', 'css']
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass', '@epegzz/sass-vars-loader']
},
{
test: /\.json$/,
loader: 'json-loader'
},
{ test: /\.(woff2?|ttf|svg|eot|jpe?g)$/, loader: 'ignore-loader' }
]
},
sassVars: {
vars: {
favouriteColor: 'red',
}
},
from sass-vars-loader.
Okay, let's see
- which version of webpack are you using? (I did not test with version 2 yet)
- did you install
sass-vars-loader
locally (notnpm install -g
)? - are you running it in docker?
from sass-vars-loader.
Hey again!
I'm using webpack 1.13.2
, it is installed locally, and i am not running in docker
from sass-vars-loader.
Looks like #5 will fix the issue! Expect a fixed npm version tomorrow :)
from sass-vars-loader.
resolved in current version on npm
from sass-vars-loader.
Related Issues (20)
- Respect file order HOT 1
- Variable not getting to scss with web pack 3.11 in angular 5 HOT 5
- Typescript support HOT 1
- Leading zero in string gets removed HOT 14
- Missing dependencies in 4.1.0 HOT 1
- Broken as of version 4.3.0 HOT 6
- Can I use this for stylus or less ? HOT 2
- Module build failed with Vue-CLI HOT 14
- Improve documentation
- HRM doesn't work for variable files in symlinks or packages HOT 3
- Missing additional loader? Any help? HOT 1
- Variables undefined when use sass-loader.options.data attribute HOT 19
- Assertion error on precommit hook HOT 3
- SyntaxError: Unexpected token ']', web pack HOT 3
- Color names in JSON keys are interpreted as color objects by SASS HOT 4
- Unable to pass version string to add inside css comment HOT 2
- Is it possible to load the JSON file using inline loaders? HOT 1
- Passing transformer function as option HOT 3
- SassError: Invalid CSS after "..., -apple-system": expected ":", was ", BlinkMacSystemFon" HOT 1
- Webpack 5 implimentation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sass-vars-loader.