sass-loader 3.2.3 → 4.0.0
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 +8 -0
- package/README.md +6 -1
- package/index.js +3 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
---------
|
|
3
3
|
|
|
4
|
+
### 4.0.0
|
|
5
|
+
|
|
6
|
+
- **Breaking**: Release new major version because the previous release was a breaking change in certain scenarios [#250](https://github.com/jtangelder/sass-loader/pull/250)
|
|
7
|
+
|
|
8
|
+
### 3.2.2
|
|
9
|
+
|
|
10
|
+
- Fix incorrect source map paths [#250](https://github.com/jtangelder/sass-loader/pull/250)
|
|
11
|
+
|
|
4
12
|
### 3.2.1
|
|
5
13
|
|
|
6
14
|
- Add `webpack@^2.1.0-beta` as peer dependency [#233](https://github.com/jtangelder/sass-loader/pull/233)
|
package/README.md
CHANGED
|
@@ -94,7 +94,12 @@ 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/
|
|
97
|
+
@import "~bootstrap/css/bootstrap";
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Alternatively, for bootstrap-sass:
|
|
101
|
+
```css
|
|
102
|
+
@import "~bootstrap-sass/assets/stylesheets/bootstrap";
|
|
98
103
|
```
|
|
99
104
|
|
|
100
105
|
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.context + '/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,7 +278,8 @@ 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.
|
|
281
|
+
result.map.sources[0] = path.relative(self.options.context, resourcePath);
|
|
282
|
+
result.map.sourceRoot = path.relative(self.options.context, process.cwd());
|
|
282
283
|
} else {
|
|
283
284
|
result.map = null;
|
|
284
285
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sass-loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
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.0
|
|
35
|
+
"loader-utils": "^0.2.15",
|
|
36
|
+
"object-assign": "^4.1.0"
|
|
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.3
|
|
45
|
-
"node-sass": "3.
|
|
43
|
+
"jshint": "^2.9.2",
|
|
44
|
+
"mocha": "^2.5.3",
|
|
45
|
+
"node-sass": "^3.8.0",
|
|
46
46
|
"raw-loader": "^0.5.1",
|
|
47
|
-
"should": "^
|
|
48
|
-
"style-loader": "^0.13.
|
|
49
|
-
"webpack": "^1.
|
|
47
|
+
"should": "^9.0.2",
|
|
48
|
+
"style-loader": "^0.13.1",
|
|
49
|
+
"webpack": "^1.13.1",
|
|
50
50
|
"webpack-dev-server": "^1.7.0"
|
|
51
51
|
}
|
|
52
52
|
}
|