sass-loader 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -4
- package/README.md +1 -6
- package/index.js +2 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -94,12 +94,7 @@ module.exports = {
|
|
|
94
94
|
webpack provides an [advanced mechanism to resolve files](http://webpack.github.io/docs/resolving.html). The sass-loader uses node-sass' custom importer feature to pass all queries to the webpack resolving engine. Thus you can import your Sass modules from `node_modules`. Just prepend them with a `~` to tell webpack that this is not a relative import:
|
|
95
95
|
|
|
96
96
|
```css
|
|
97
|
-
@import "~bootstrap/
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Alternatively, for bootstrap-sass:
|
|
101
|
-
```css
|
|
102
|
-
@import "~bootstrap-sass/assets/stylesheets/bootstrap";
|
|
97
|
+
@import "~bootstrap/less/bootstrap";
|
|
103
98
|
```
|
|
104
99
|
|
|
105
100
|
It's important to only prepend it with `~`, because `~/` resolves to the home directory. webpack needs to distinguish between `bootstrap` and `~bootstrap` because CSS- and Sass-files have no special syntax for importing relative files. Writing `@import "file"` is the same as `@import "./file";`
|
package/index.js
CHANGED
|
@@ -224,7 +224,7 @@ module.exports = function (content) {
|
|
|
224
224
|
// deliberately overriding the sourceMap option
|
|
225
225
|
// this value is (currently) ignored by libsass when using the data input instead of file input
|
|
226
226
|
// however, it is still necessary for correct relative paths in result.map.sources
|
|
227
|
-
sassOptions.sourceMap = this.options.
|
|
227
|
+
sassOptions.sourceMap = this.options.output.path + '/sass.map';
|
|
228
228
|
sassOptions.omitSourceMapUrl = true;
|
|
229
229
|
|
|
230
230
|
// If sourceMapContents option is not set, set it to true otherwise maps will be empty/null
|
|
@@ -278,8 +278,7 @@ module.exports = function (content) {
|
|
|
278
278
|
result.map.file = resourcePath;
|
|
279
279
|
// The first source is 'stdin' according to libsass because we've used the data input
|
|
280
280
|
// Now let's override that value with the correct relative path
|
|
281
|
-
result.map.sources[0] = path.relative(self.options.
|
|
282
|
-
result.map.sourceRoot = path.relative(self.options.context, process.cwd());
|
|
281
|
+
result.map.sources[0] = path.relative(self.options.output.path, resourcePath);
|
|
283
282
|
} else {
|
|
284
283
|
result.map = null;
|
|
285
284
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-loader",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "Sass loader for webpack",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"async": "^1.4.0",
|
|
35
|
-
"loader-utils": "^0.2.
|
|
36
|
-
"object-assign": "^4.1
|
|
35
|
+
"loader-utils": "^0.2.5",
|
|
36
|
+
"object-assign": "^4.0.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"bootstrap-sass": "^3.3.5",
|
|
40
40
|
"css-loader": "^0.23.0",
|
|
41
41
|
"enhanced-require": "^0.5.0-beta6",
|
|
42
42
|
"file-loader": "^0.8.4",
|
|
43
|
-
"jshint": "^2.
|
|
44
|
-
"mocha": "^2.
|
|
45
|
-
"node-sass": "
|
|
43
|
+
"jshint": "^2.8.0",
|
|
44
|
+
"mocha": "^2.3.4",
|
|
45
|
+
"node-sass": "3.4.2",
|
|
46
46
|
"raw-loader": "^0.5.1",
|
|
47
|
-
"should": "^
|
|
48
|
-
"style-loader": "^0.13.
|
|
49
|
-
"webpack": "^1.
|
|
47
|
+
"should": "^8.2.2",
|
|
48
|
+
"style-loader": "^0.13.0",
|
|
49
|
+
"webpack": "^1.12.14",
|
|
50
50
|
"webpack-dev-server": "^1.7.0"
|
|
51
51
|
}
|
|
52
52
|
}
|