-
-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.2 module resolve requires underbar for includePaths. #98
Comments
Since sass-loader 1.0.0 you don't need to set the The error about not finding Could you post your |
The things in the vendor directory are not things I expect WebPack to resolve? So for my case, I would expect I would need to set the includePaths. I've pared it down to the essentials: 'use strict';
var webpack = require('webpack');
var path = require('path');
var scssIncludes =
'includePaths[]=' + path.resolve(__dirname, './src/main/resources/vendor/foundation/scss');
var root = path.resolve(__dirname, './src/main/js');
var commonLoaders = [
{ test: /\.json$/, loader: 'json' },
{ test: /\.js(x?)$/,
loader: 'babel?optional=runtime'
},
{ test: /\.(ico|gif|png|jpg|svg)$/, loader: 'url?limit=100000&name=resources/images/[name].[ext]&mimeType=image/[ext]' },
{
test: /\.(eot|ttf|woff)$/,
loader: 'file',
query: {
name: 'resources/fonts/[name].[ext]'
}
}
];
module.exports =
{
name: 'browser',
output: {
path: './stage/client/',
filename: 'js/[hash].js',
chunkFilename: 'js/[hash]-[id].js',
publicPath: '/'
},
cache: true,
debug: true,
devtool: 'source-map',
entry: './src/main/js/index.js',
target: 'web',
resolve: {
root: root,
extensions: ['', '.jsx', '.js', '.json', '.css', '.scss', '.html']
},
module: {
loaders: commonLoaders.concat([
{ test: /\.css$/, loader: 'style!css' },
{ test: /\.scss$/, loader: 'style!css!sass?' + scssIncludes }
])
}
}; |
Mhmm it could be that |
I would prefer to write the scss (and really, all my code) webpack-agnostically. Any updates? |
I'm facing the same issue, watching this thread. |
That's a valid argument... I'll have a look as soon as I found some time. Unfortunately I'm loaded with work... 😒. In the meantime, you can also take a look for yourself. The code is not complicated, but it requires some understanding about how to write loaders for webpack. |
It looks like the maintainers are having a holiday. I hope they can review all PR's soon. |
Should be fixed with 1.0.3 |
Just upgraded from 0.4, so I can get node-sass 3, but will need to drop back down.
I have bower install foundation to a vendor directory in my project. My app's stylesheet extends foundation.
If i
@import "foundation"
... (includePaths set) sass-loader looks for _foundation.scss instead of foundation.scss. (it should be using the name resolve pattern for each include path)my grunt sass task completes just fine. (using the same node-sass lib 3.1.1)
The text was updated successfully, but these errors were encountered: