sass-loader 6.0.3 → 6.0.7

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 CHANGED
@@ -1,125 +1,297 @@
1
- Changelog
2
- ---------
1
+ # Change Log
3
2
 
4
- ### 6.0.3
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
5
4
 
6
- - Fix regression with empty files [#398](https://github.com/webpack-contrib/sass-loader/pull/398)
7
- - Reduce npm package size by using the [files](https://docs.npmjs.com/files/package.json#files) property in the `package.json`
5
+ <a name="6.0.7"></a>
6
+ ## [6.0.7](https://github.com/webpack-contrib/sass-loader/compare/v6.0.6...v6.0.7) (2018-03-03)
8
7
 
9
- ### 6.0.2
10
8
 
11
- - Update dependencies [#383](https://github.com/webpack-contrib/sass-loader/pull/383)
9
+ ### Bug Fixes
12
10
 
13
- ### 6.0.1
11
+ * **package:** add `webpack >= v4.0.0` (`peerDependencies`) ([#541](https://github.com/webpack-contrib/sass-loader/issues/541)) ([620bdd4](https://github.com/webpack-contrib/sass-loader/commit/620bdd4))
14
12
 
15
- - Fix source maps in certain CWDs. [#377](https://github.com/webpack-contrib/sass-loader/pull/377)
16
13
 
17
- ### 6.0.0
14
+ ### Performance Improvements
18
15
 
19
- - **Breaking** (for resolve-url-loader only): Improve source map support. [#374](https://github.com/webpack-contrib/sass-loader/issues/374)
16
+ * use `neo-async` instead `async` ([#538](https://github.com/webpack-contrib/sass-loader/issues/538)) ([fab89dc](https://github.com/webpack-contrib/sass-loader/commit/fab89dc))
20
17
 
21
- ### 5.0.1
22
18
 
23
- - Fix bug where multiple compilations interfered with each other. [#369](https://github.com/webpack-contrib/sass-loader/pull/369)
24
19
 
25
- ### 5.0.0
20
+ <a name="6.0.6"></a>
21
+ ## [6.0.6](https://github.com/webpack-contrib/sass-loader/compare/v6.0.5...v6.0.6) (2017-06-14)
26
22
 
27
- - **Breaking**: Remove synchronous compilation support. [#334](https://github.com/webpack-contrib/sass-loader/pull/334)
28
- - **Breaking**: Remove official node-sass@3 and webpack@1 support. [5a6bcb96d8bd7a7a11c33252ba739ffe09ca38c5](https://github.com/webpack-contrib/sass-loader/commit/5a6bcb96d8bd7a7a11c33252ba739ffe09ca38c5)
29
- - **Breaking**: Remove node 0.12 support. [29b30755021a834e622bf4b5bb9db4d6e5913905](https://github.com/webpack-contrib/sass-loader/commit/29b30755021a834e622bf4b5bb9db4d6e5913905)
23
+ ### Chore
30
24
 
31
- ### 4.1.1
25
+ * Adds Webpack 3.x version range to peerDependencies
32
26
 
33
- - Update `webpack` peer dependency to support `2.2.0rc`. [#330](https://github.com/webpack-contrib/sass-loader/pull/330)
34
27
 
35
- ### 4.1.0
28
+ <a name="6.0.5"></a>
29
+ # [6.0.5](https://github.com/webpack-contrib/sass-loader/compare/v6.0.5...v6.0.4) (2017-05-10)
36
30
 
37
- - Update `node-sass@4.0.0` [#319](https://github.com/webpack-contrib/sass-loader/pull/319)
31
+ ### Bug Fixes
38
32
 
39
- ### 4.0.2
33
+ * importing file directly from scoped npm package [#450](https://github.com/webpack-contrib/sass-loader/pull/450) ([5d06e9d](https://github.com/webpack-contrib/sass-loader/commit/5d06e9d))
40
34
 
41
- - Fix wrong context in customImporters that was introduced with fd6be1f143a1810f7e5072a865b3d8675ba1b94e [#275](https://github.com/webpack-contrib/sass-loader/issues/275) [#277](https://github.com/webpack-contrib/sass-loader/pull/277)
42
35
 
43
- ### 4.0.1
36
+ <a name="6.0.4"></a>
37
+ # [6.0.4](https://github.com/webpack-contrib/sass-loader/compare/v6.0.4...v6.0.3) (2017-05-09)
44
38
 
45
- - Fix custom importers receiving `'stdin'` as second argument instead of the actual `resourcePath` [#267](https://github.com/webpack-contrib/sass-loader/pull/267)
39
+ ### Bug Fixes
46
40
 
47
- ### 4.0.0
41
+ * fix: Resolving of scoped npm packages [#447](https://github.com/webpack-contrib/sass-loader/pull/447)
48
42
 
49
- - **Breaking**: Release new major version because `3.2.2` was a breaking change in certain scenarios [#250](https://github.com/webpack-contrib/sass-loader/pull/250) [#254](https://github.com/webpack-contrib/sass-loader/issues/254)
50
43
 
51
- ### 3.2.3
44
+ <a name="6.0.3"></a>
45
+ # [6.0.3](https://github.com/webpack-contrib/sass-loader/compare/v6.0.3...v6.0.2) (2017-03-07)
52
46
 
53
- - Revert changes to `3.2.1` because `3.2.2` contained a potential breaking change [#254](https://github.com/webpack-contrib/sass-loader/issues/254)
47
+ ### Bug Fixes
54
48
 
55
- ### 3.2.2
49
+ * Fix regression with empty files [#398](https://github.com/webpack-contrib/sass-loader/pull/398)
56
50
 
57
- - Fix incorrect source map paths [#250](https://github.com/webpack-contrib/sass-loader/pull/250)
58
51
 
59
- ### 3.2.1
52
+ ### Chore
60
53
 
61
- - Add `webpack@^2.1.0-beta` as peer dependency [#233](https://github.com/webpack-contrib/sass-loader/pull/233)
54
+ * Reduce npm package size by using the [files](https://docs.npmjs.com/files/package.json#files) property in the `package.json`
62
55
 
63
- ### 3.2.0
64
56
 
65
- - Append file content instead of overwriting when `data`-option is already present [#216](https://github.com/webpack-contrib/sass-loader/pull/216)
66
- - Make `indentedSyntax` option a bit smarter [#196](https://github.com/webpack-contrib/sass-loader/pull/196)
57
+ <a name="6.0.2"></a>
58
+ # [6.0.2](https://github.com/webpack-contrib/sass-loader/compare/v6.0.2...v6.0.1) (2017-02-21)
67
59
 
68
- ### 3.1.2
60
+ ### Chore
69
61
 
70
- - Fix loader query not overriding webpack config [#189](https://github.com/webpack-contrib/sass-loader/pull/189)
71
- - Update peer-dependencies [#182](https://github.com/webpack-contrib/sass-loader/pull/182)
72
- - `node-sass@^3.4.2`
73
- - `webpack@^1.12.6`
62
+ * Update dependencies [#383](https://github.com/webpack-contrib/sass-loader/pull/383)
74
63
 
75
- ### 3.1.1
76
64
 
77
- - Fix missing module `object-assign` [#178](https://github.com/webpack-contrib/sass-loader/issues/178)
65
+ <a name="6.0.1"></a>
66
+ # [6.0.1](https://github.com/webpack-contrib/sass-loader/compare/v6.0.1...v6.0.0) (2017-02-17)
78
67
 
79
- ### 3.1.0
68
+ ### Bug Fixes
80
69
 
81
- - Add possibility to also define all options in your `webpack.config.js` [#152](https://github.com/webpack-contrib/sass-loader/pull/152) [#170](https://github.com/webpack-contrib/sass-loader/pull/170)
82
- - Fix a problem where modules with a `.` in their names were not resolved [#167](https://github.com/webpack-contrib/sass-loader/issues/167)
70
+ * Fix source maps in certain CWDs. [#377](https://github.com/webpack-contrib/sass-loader/pull/377)
83
71
 
84
- ### 3.0.0
85
72
 
86
- - **Breaking:** Add `node-sass@^3.3.3` and `webpack@^1.12.2` as peer-dependency [#165](https://github.com/webpack-contrib/sass-loader/pull/165) [#166](https://github.com/webpack-contrib/sass-loader/pull/166) [#169](https://github.com/webpack-contrib/sass-loader/pull/169)
87
- - Fix crash when Sass reported an error without `file` [#158](https://github.com/webpack-contrib/sass-loader/pull/158)
73
+ <a name="6.0.0"></a>
74
+ # [6.0.0](https://github.com/webpack-contrib/sass-loader/compare/v6.0.0...v5.0.1) (2017-02-13)
88
75
 
89
- ### 2.0.1
76
+ ### Bug Fixes
90
77
 
91
- - Add missing path normalization [#141](https://github.com/webpack-contrib/sass-loader/pull/141)
78
+ * Improve source map support. [#374](https://github.com/webpack-contrib/sass-loader/issues/374)
92
79
 
93
- ### 2.0.0
94
80
 
95
- - **Breaking:** Refactor [import resolving algorithm](https://github.com/webpack-contrib/sass-loader/blob/089c52dc9bd02ec67fb5c65c2c226f43710f231c/index.js#L293-L348). The new algorithm is aligned to libsass' way of resolving files. This yields to different results if two files with the same path and filename but with different extensions are present. Though this change should be no problem for most users, we must flag it as breaking change. [#135](https://github.com/webpack-contrib/sass-loader/issues/135) [#138](https://github.com/webpack-contrib/sass-loader/issues/138)
96
- - Add temporary fix for stuck processes (see [sass/node-sass#857](https://github.com/sass/node-sass/issues/857)) [#100](https://github.com/webpack-contrib/sass-loader/issues/100) [#119](https://github.com/webpack-contrib/sass-loader/issues/119) [#132](https://github.com/webpack-contrib/sass-loader/pull/132)
97
- - Fix path resolving on Windows [#108](https://github.com/webpack-contrib/sass-loader/issues/108)
98
- - Fix file watchers on Windows [#102](https://github.com/webpack-contrib/sass-loader/issues/102)
99
- - Fix file watchers for files with errors [#134](https://github.com/webpack-contrib/sass-loader/pull/134)
81
+ ### BREAKING CHANGES
100
82
 
101
- ### 1.0.4
83
+ * This is breaking for the resolve-url-loader
102
84
 
103
- - Fix wrong source-map urls [#123](https://github.com/webpack-contrib/sass-loader/pull/123)
104
- - Include source-map contents by default [#104](https://github.com/webpack-contrib/sass-loader/pull/104)
105
85
 
106
- ### 1.0.3
86
+ <a name="5.0.1"></a>
87
+ # [5.0.1](https://github.com/webpack-contrib/sass-loader/compare/v5.0.1...v5.0.0) (2017-02-13)
107
88
 
108
- - Fix importing css files from scss/sass [#101](https://github.com/webpack-contrib/sass-loader/issues/101)
109
- - Fix importing Sass partials from includePath [#98](https://github.com/webpack-contrib/sass-loader/issues/98) [#110](https://github.com/webpack-contrib/sass-loader/issues/110)
89
+ ### Bug Fixes
110
90
 
111
- ### 1.0.2
91
+ * Fix bug where multiple compilations interfered with each other. [#369](https://github.com/webpack-contrib/sass-loader/pull/369)
112
92
 
113
- - Fix a bug where files could not be imported across language styles [#73](https://github.com/webpack-contrib/sass-loader/issues/73)
114
- - Update peer-dependency `node-sass` to `3.1.0`
115
93
 
116
- ### 1.0.1
94
+ <a name="5.0.0"></a>
95
+ # [5.0.0](https://github.com/webpack-contrib/sass-loader/compare/v5.0.0...v4.1.1) (2017-02-13)
117
96
 
118
- - Fix Sass partials not being resolved anymore [#68](https://github.com/webpack-contrib/sass-loader/issues/68)
119
- - Update peer-dependency `node-sass` to `3.0.0-beta.4`
97
+ ### Code Refactoring
120
98
 
121
- ### 1.0.0
99
+ * Remove synchronous compilation support [#334](https://github.com/webpack-contrib/sass-loader/pull/334)
122
100
 
123
- - Moved `node-sass^3.0.0-alpha.0` to `peerDependencies` [#28](https://github.com/webpack-contrib/sass-loader/issues/28)
124
- - Using webpack's module resolver as custom importer [#39](https://github.com/webpack-contrib/sass-loader/issues/31)
125
- - Add synchronous compilation support for usage with [enhanced-require](https://github.com/webpack/enhanced-require) [#39](https://github.com/webpack-contrib/sass-loader/pull/39)
101
+
102
+ ### BREAKING CHANGES
103
+
104
+ * Remove node 0.12 support. [29b30755021a834e622bf4b5bb9db4d6e5913905](https://github.com/webpack-contrib/sass-loader/commit/29b30755021a834e622bf4b5bb9db4d6e5913905)
105
+ * Remove official node-sass@3 and webpack@1 support. [5a6bcb96d8bd7a7a11c33252ba739ffe09ca38c5](https://github.com/webpack-contrib/sass-loader/commit/5a6bcb96d8bd7a7a11c33252ba739ffe09ca38c5)
106
+ * Remove synchronous compilation support. [#334](https://github.com/webpack-contrib/sass-loader/pull/334)
107
+
108
+
109
+ <a name="4.1.1"></a>
110
+ # [4.1.1](https://github.com/webpack-contrib/sass-loader/compare/v4.1.1...v4.1.0) (2016-12-21)
111
+
112
+ ### Chore
113
+
114
+ * Update webpack peer dependency to support 2.2.0rc. [#330](https://github.com/webpack-contrib/sass-loader/pull/330)
115
+
116
+
117
+ <a name="4.1.0"></a>
118
+ # [4.1.0](https://github.com/webpack-contrib/sass-loader/compare/v4.1.0...v4.0.2) (2016-12-14)
119
+
120
+ ### Features
121
+
122
+ * Update `node-sass@4.0.0` [#319](https://github.com/webpack-contrib/sass-loader/pull/319)
123
+
124
+
125
+ <a name="4.0.2"></a>
126
+ # [4.0.2](https://github.com/webpack-contrib/sass-loader/compare/v4.0.2...v4.0.1) (2016-07-07)
127
+
128
+ ### Bug Fixes
129
+
130
+ * Fix wrong context in customImporters [#281](https://github.com/webpack-contrib/sass-loader/pull/281)
131
+
132
+
133
+ <a name="4.0.1"></a>
134
+ # [4.0.1](https://github.com/webpack-contrib/sass-loader/compare/v4.0.1...v4.0.0) (2016-07-01)
135
+
136
+ ### Bug Fixes
137
+
138
+ * Fix custom importers receiving `'stdin'` as second argument instead of the actual `resourcePath` [#267](https://github.com/webpack-contrib/sass-loader/pull/267)
139
+
140
+
141
+ <a name="4.0.0"></a>
142
+ # [4.0.0](https://github.com/webpack-contrib/sass-loader/compare/v4.0.0...v3.2.2) (2016-06-27)
143
+
144
+ ### Bug Fixes
145
+
146
+ * Fix incorrect source map paths [#250](https://github.com/webpack-contrib/sass-loader/pull/250)
147
+
148
+
149
+ ### BREAKING CHANGES
150
+
151
+ * Release new major version because the previous release was a breaking change in certain scenarios
152
+ See: https://github.com/webpack-contrib/sass-loader/pull/250#issuecomment-228663059
153
+
154
+
155
+ <a name="3.2.2"></a>
156
+ # [3.2.2](https://github.com/webpack-contrib/sass-loader/compare/v3.2.2...v3.2.1) (2016-06-26)
157
+
158
+ ### Bug Fixes
159
+
160
+ * Fix incorrect source map paths [#250](https://github.com/webpack-contrib/sass-loader/pull/250)
161
+
162
+
163
+ <a name="3.2.1"></a>
164
+ # [3.2.1](https://github.com/webpack-contrib/sass-loader/compare/v3.2.1...v3.2.0) (2016-06-19)
165
+
166
+ ### Bug Fixes
167
+
168
+ * Add `webpack@^2.1.0-beta` as peer dependency [#233](https://github.com/webpack-contrib/sass-loader/pull/233)
169
+
170
+
171
+ <a name="3.2.0"></a>
172
+ # [3.2.0](https://github.com/webpack-contrib/sass-loader/compare/v3.2.0...v3.1.2) (2016-03-12)
173
+
174
+ ### Features
175
+
176
+ * Append file content instead of overwriting when `data`-option is already present [#216](https://github.com/webpack-contrib/sass-loader/pull/216)
177
+ * Make `indentedSyntax` option a bit smarter [#196](https://github.com/webpack-contrib/sass-loader/pull/196)
178
+
179
+
180
+ <a name="3.1.2"></a>
181
+ # [3.1.2](https://github.com/webpack-contrib/sass-loader/compare/v3.1.2...v3.1.1) (2015-11-22)
182
+
183
+ ### Bug Fixes
184
+
185
+ * Fix loader query not overriding webpack config [#189](https://github.com/webpack-contrib/sass-loader/pull/189)
186
+ * Update peer-dependencies [#182](https://github.com/webpack-contrib/sass-loader/pull/182)
187
+ - `node-sass^3.4.2`
188
+ - `webpack^1.12.6`
189
+
190
+
191
+ <a name="3.1.1"></a>
192
+ # [3.1.1](https://github.com/webpack-contrib/sass-loader/compare/v3.1.1...v3.1.0) (2015-10-26)
193
+
194
+ ### Bug Fixes
195
+
196
+ * Fix missing module `object-assign` [#178](https://github.com/webpack-contrib/sass-loader/issues/178)
197
+
198
+
199
+ <a name="3.1.0"></a>
200
+ # [3.1.0](https://github.com/webpack-contrib/sass-loader/compare/v3.1.0...v3.0.0) (2015-10-25)
201
+
202
+ ### Bug Fixes
203
+
204
+ * Fix a problem where modules with a `.` in their names were not resolved [#167](https://github.com/webpack-contrib/sass-loader/issues/167)
205
+
206
+
207
+ ### Features
208
+
209
+ * Add possibility to also define all options in your `webpack.config.js` [#152](https://github.com/webpack-contrib/sass-loader/pull/152) [#170](https://github.com/webpack-contrib/sass-loader/pull/170)
210
+
211
+
212
+ <a name="3.0.0"></a>
213
+ # [3.0.0](https://github.com/webpack-contrib/sass-loader/compare/v3.0.0...v2.0.1) (2015-09-29)
214
+
215
+ ### Bug Fixes
216
+
217
+ * Fix crash when Sass reported an error without `file` [#158](https://github.com/webpack-contrib/sass-loader/pull/158)
218
+
219
+
220
+ ### BREAKING CHANGES
221
+
222
+ * Add `node-sass@^3.3.3` and `webpack@^1.12.2` as peer-dependency [#165](https://github.com/webpack-contrib/sass-loader/pull/165) [#166](https://github.com/webpack-contrib/sass-loader/pull/166) [#169](https://github.com/webpack-contrib/sass-loader/pull/169)
223
+
224
+
225
+ <a name="2.0.1"></a>
226
+ # [2.0.1](https://github.com/webpack-contrib/sass-loader/compare/v2.0.1...v2.0.0) (2015-08-14)
227
+
228
+ ### Bug Fixes
229
+
230
+ * Add missing path normalization (fixes [#141](https://github.com/webpack-contrib/sass-loader/pull/141))
231
+
232
+
233
+ <a name="2.0.0"></a>
234
+ # [2.0.0](https://github.com/webpack-contrib/sass-loader/compare/v2.0.0...v1.0.4) (2015-08-06)
235
+
236
+ ### Bug Fixes
237
+
238
+ * Add temporary fix for stuck processes (see [sass/node-sass#857](https://github.com/sass/node-sass/issues/857)) [#100](https://github.com/webpack-contrib/sass-loader/issues/100) [#119](https://github.com/webpack-contrib/sass-loader/issues/119) [#132](https://github.com/webpack-contrib/sass-loader/pull/132)
239
+ * Fix path resolving on Windows [#108](https://github.com/webpack-contrib/sass-loader/issues/108)
240
+ * Fix file watchers on Windows [#102](https://github.com/webpack-contrib/sass-loader/issues/102)
241
+ * Fix file watchers for files with errors [#134](https://github.com/webpack-contrib/sass-loader/pull/134)
242
+
243
+
244
+ ### Code Refactoring
245
+
246
+ * Refactor [import resolving algorithm](https://github.com/webpack-contrib/sass-loader/blob/089c52dc9bd02ec67fb5c65c2c226f43710f231c/index.js#L293-L348). ([#138](https://github.com/webpack-contrib/sass-loader/issues/138)) ([c8621a1](https://github.com/webpack-contrib/sass-loader/commit/80944ccf09cd9716a100160c068d255c5d742338))
247
+
248
+
249
+ ### BREAKING CHANGES
250
+
251
+ * The new algorithm is aligned to libsass' way of resolving files. This yields to different results if two files with the same path and filename but with different extensions are present. Though this change should be no problem for most users, we must flag it as breaking change. [#135](https://github.com/webpack-contrib/sass-loader/issues/135) [#138](https://github.com/webpack-contrib/sass-loader/issues/138)
252
+
253
+
254
+ <a name="1.0.4"></a>
255
+ # [1.0.4](https://github.com/webpack-contrib/sass-loader/compare/v1.0.4...v1.0.3) (2015-08-03)
256
+
257
+ ### Bug Fixes
258
+
259
+ * Fix wrong source-map urls [#123](https://github.com/webpack-contrib/sass-loader/pull/123)
260
+ * Include source-map contents by default [#104](https://github.com/webpack-contrib/sass-loader/pull/104)
261
+
262
+
263
+ <a name="1.0.3"></a>
264
+ # [1.0.3](https://github.com/webpack-contrib/sass-loader/compare/v1.0.3...v1.0.2) (2015-07-22)
265
+
266
+ ### Bug Fixes
267
+
268
+ * Fix importing css files from scss/sass [#101](https://github.com/webpack-contrib/sass-loader/issues/101)
269
+ * Fix importing Sass partials from includePath [#98](https://github.com/webpack-contrib/sass-loader/issues/98) [#110](https://github.com/webpack-contrib/sass-loader/issues/110)
270
+
271
+
272
+ <a name="1.0.2"></a>
273
+ # [1.0.2](https://github.com/webpack-contrib/sass-loader/compare/v1.0.2...v1.0.1) (2015-04-15)
274
+
275
+ ### Bug Fixes
276
+
277
+ * Fix a bug where files could not be imported across language styles [#73](https://github.com/webpack-contrib/sass-loader/issues/73)
278
+ * Update peer-dependency `node-sass` to `3.1.0`
279
+
280
+
281
+ <a name="1.0.1"></a>
282
+ # [1.0.1](https://github.com/webpack-contrib/sass-loader/compare/v1.0.1...v1.0.0) (2015-03-31)
283
+
284
+ ### Bug Fixes
285
+
286
+ * Fix Sass partials not being resolved anymore [#68](https://github.com/webpack-contrib/sass-loader/issues/68)
287
+ * Update peer-dependency `node-sass` to `3.0.0-beta.4`
288
+
289
+
290
+ <a name="1.0.0"></a>
291
+ # [1.0.0](https://github.com/webpack-contrib/sass-loader/compare/v1.0.0...v0.3.1) (2015-03-22)
292
+
293
+ ### Bug Fixes
294
+
295
+ * Moved `node-sass^3.0.0-alpha.0` to `peerDependencies` [#28](https://github.com/webpack-contrib/sass-loader/issues/28)
296
+ * Using webpack's module resolver as custom importer [#39](https://github.com/webpack-contrib/sass-loader/issues/31)
297
+ * Add synchronous compilation support for usage with [enhanced-require](https://github.com/webpack/enhanced-require) [#39](https://github.com/webpack-contrib/sass-loader/pull/39)
package/README.md CHANGED
@@ -11,27 +11,33 @@
11
11
  <img height="100"
12
12
  src="https://worldvectorlogo.com/logos/sass-1.svg">
13
13
  <a href="https://github.com/webpack/webpack">
14
- <img height="100"
15
- src="https://github.com/webpack/media/raw/master/logo/logo-on-white-bg.png?raw=true">
14
+ <img width="200" height="200"
15
+ src="https://webpack.js.org/assets/icon-square-big.svg">
16
16
  </a>
17
- <h1>sass-loader</h1>
18
- <p>Compiles Sass to CSS.<br>Use the <a href="https://github.com/webpack-contrib/css-loader">css-loader</a> or the <a href="https://github.com/webpack-contrib/raw-loader">raw-loader</a> to turn it into a JS module and the <a href="https://github.com/webpack-contrib/extract-text-webpack-plugin">ExtractTextPlugin</a> to extract it into a separate file.<p>
19
- <p>Looking for the webpack 1 loader? Check out the <a href="https://github.com/webpack-contrib/sass-loader/tree/archive/webpack-1">archive/webpack-1 branch</a>.</p>
17
+ <h1>SASS Loader</h1>
18
+ <p>Loads a SASS/SCSS file and compiles it to CSS.</p>
20
19
  </div>
21
20
 
21
+ Use the [css-loader](https://github.com/webpack-contrib/css-loader) or the [raw-loader](https://github.com/webpack-contrib/raw-loader) to turn it into a JS module and the [ExtractTextPlugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) to extract it into a separate file.
22
+ Looking for the webpack 1 loader? Check out the [archive/webpack-1 branch](https://github.com/webpack-contrib/sass-loader/tree/archive/webpack-1).
23
+
22
24
  <h2 align="center">Install</h2>
23
25
 
24
26
  ```bash
25
27
  npm install sass-loader node-sass webpack --save-dev
26
28
  ```
27
29
 
28
- The sass-loader requires [node-sass](https://github.com/sass/node-sass) and [webpack](https://github.comwebpack)
30
+ The sass-loader requires [node-sass](https://github.com/sass/node-sass) and [webpack](https://github.com/webpack)
29
31
  as [`peerDependency`](https://docs.npmjs.com/files/package.json#peerdependencies). Thus you are able to control the versions accurately.
30
32
 
31
33
  <h2 align="center">Examples</h2>
32
34
 
33
35
  Chain the sass-loader with the [css-loader](https://github.com/webpack-contrib/css-loader) and the [style-loader](https://github.com/webpack-contrib/style-loader) to immediately apply all styles to the DOM.
34
36
 
37
+ ```bash
38
+ npm install style-loader css-loader --save-dev
39
+ ```
40
+
35
41
  ```js
36
42
  // webpack.config.js
37
43
  module.exports = {
@@ -94,7 +100,7 @@ module.exports = {
94
100
  module: {
95
101
  rules: [{
96
102
  test: /\.scss$/,
97
- loader: extractSass.extract({
103
+ use: extractSass.extract({
98
104
  use: [{
99
105
  loader: "css-loader"
100
106
  }, {
@@ -115,10 +121,10 @@ module.exports = {
115
121
 
116
122
  ### Imports
117
123
 
118
- 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:
124
+ webpack provides an [advanced mechanism to resolve files](https://webpack.js.org/concepts/module-resolution/). 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:
119
125
 
120
126
  ```css
121
- @import "~bootstrap/css/bootstrap";
127
+ @import "~bootstrap/dist/css/bootstrap";
122
128
  ```
123
129
 
124
130
  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";`
@@ -132,7 +138,7 @@ Since Sass/[libsass](https://github.com/sass/libsass) does not provide [url rewr
132
138
 
133
139
  More likely you will be disrupted by this second issue. It is natural to expect relative references to be resolved against the `.scss` file in which they are specified (like in regular `.css` files). Thankfully there are a two solutions to this problem:
134
140
 
135
- - Add the missing url rewriting using the [resolve-url-loader](https://github.com/bholloway/resolve-url-loader). Place it directly after the sass-loader in the loader chain.
141
+ - Add the missing url rewriting using the [resolve-url-loader](https://github.com/bholloway/resolve-url-loader). Place it before the sass-loader in the loader chain.
136
142
  - Library authors usually provide a variable to modify the asset path. [bootstrap-sass](https://github.com/twbs/bootstrap-sass) for example has an `$icon-font-path`. Check out [this working bootstrap example](https://github.com/webpack-contrib/sass-loader/tree/master/test/bootstrapSass).
137
143
 
138
144
  ### Extracting style sheets
@@ -191,25 +197,20 @@ If you want to prepend Sass code before the actual entry file, you can set the `
191
197
  <h2 align="center">Maintainers</h2>
192
198
 
193
199
  <table>
194
- <tbody>
195
200
  <tr>
196
201
  <td align="center">
197
- <img width="150 height="150"
198
- src="https://avatars0.githubusercontent.com/u/781746?v=3"><br>
202
+ <a href="https://github.com/jhnns"><img width="150" height="150" src="https://avatars0.githubusercontent.com/u/781746?v=3"></a><br>
199
203
  <a href="https://github.com/jhnns">Johannes Ewald</a>
200
204
  </td>
201
205
  <td align="center">
202
- <img width="150 height="150"
203
- src="https://avatars1.githubusercontent.com/u/1243901?v=3&s=460"><br>
206
+ <a href="https://github.com/webpack-contrib"><img width="150" height="150" src="https://avatars1.githubusercontent.com/u/1243901?v=3&s=460"></a><br>
204
207
  <a href="https://github.com/webpack-contrib">Jorik Tangelder</a>
205
208
  </td>
206
209
  <td align="center">
207
- <img width="150" height="150"
208
- src="https://avatars1.githubusercontent.com/u/3403295?v=3"><br>
210
+ <a href="https://github.com/akiran"><img width="150" height="150" src="https://avatars1.githubusercontent.com/u/3403295?v=3"></a><br>
209
211
  <a href="https://github.com/akiran">Kiran</a>
210
212
  </td>
211
213
  <tr>
212
- <tbody>
213
214
  </table>
214
215
 
215
216
 
@@ -230,11 +231,11 @@ If you want to prepend Sass code before the actual entry file, you can set the `
230
231
  [travis]: http://img.shields.io/travis/webpack-contrib/sass-loader.svg
231
232
  [travis-url]: https://travis-ci.org/webpack-contrib/sass-loader
232
233
 
233
- [appveyor-url]: https://ci.appveyor.com/project/jhnns/sass-loader/branch/master
234
- [appveyor]: https://ci.appveyor.com/api/projects/status/github/webpack-contrib/sass-loader?svg=true
234
+ [appveyor-url]: https://ci.appveyor.com/project/webpack-contrib/sass-loader/branch/master
235
+ [appveyor]: https://ci.appveyor.com/api/projects/status/rqpy1vaovh20ttxs/branch/master?svg=true
235
236
 
236
- [cover]: https://coveralls.io/repos/github/webpack-contrib/sass-loader/badge.svg
237
- [cover-url]: https://coveralls.io/github/webpack-contrib/sass-loader
237
+ [cover]: https://codecov.io/gh/webpack-contrib/sass-loader/branch/master/graph/badge.svg
238
+ [cover-url]: https://codecov.io/gh/webpack-contrib/sass-loader
238
239
 
239
- [chat]: https://badges.gitter.im/webpack-contrib/webpack.svg
240
- [chat-url]: https://gitter.im/webpack-contrib/webpack
240
+ [chat]: https://badges.gitter.im/webpack/webpack.svg
241
+ [chat-url]: https://gitter.im/webpack/webpack
@@ -28,12 +28,21 @@ function importsToResolve(request) {
28
28
  const basename = path.basename(request);
29
29
  const dirname = path.dirname(request);
30
30
  const startsWithUnderscore = basename.charAt(0) === "_";
31
- // a module import is an identifier like 'bootstrap-sass'
32
- // We also need to check for dirname since it might also be a deep import like 'bootstrap-sass/something'
33
- const isModuleImport = request.charAt(0) !== "." && dirname === ".";
34
31
  const hasCssExt = ext === ".css";
35
32
  const hasSassExt = ext === ".scss" || ext === ".sass";
36
33
 
34
+ // a module import is an identifier like 'bootstrap-sass'
35
+ // We also need to check for dirname since it might also be a deep import like 'bootstrap-sass/something'
36
+ let isModuleImport = request.charAt(0) !== "." && dirname === ".";
37
+
38
+ if (dirname.charAt(0) === "@") {
39
+ // Check whether it is a deep import from scoped npm package
40
+ // (i.e. @pkg/foo/file), if so, process import as file import;
41
+ // otherwise, if we import from root npm scoped package (i.e. @pkg/foo)
42
+ // process import as a module import.
43
+ isModuleImport = !(dirname.indexOf("/") > -1);
44
+ }
45
+
37
46
  return (isModuleImport && [request]) || // Do not modify module imports
38
47
  (hasCssExt && []) || // Do not import css files
39
48
  (hasSassExt && [request]) || // Do not modify imports with explicit extensions
package/lib/loader.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const sass = require("node-sass");
4
4
  const path = require("path");
5
- const async = require("async");
5
+ const async = require("neo-async");
6
6
  const formatSassError = require("./formatSassError");
7
7
  const webpackImporter = require("./webpackImporter");
8
8
  const normalizeOptions = require("./normalizeOptions");
@@ -35,8 +35,6 @@ function sassLoader(content) {
35
35
  throw new Error("Synchronous compilation is not supported anymore. See https://github.com/webpack-contrib/sass-loader/issues/333");
36
36
  }
37
37
 
38
- this.cacheable();
39
-
40
38
  const options = normalizeOptions(this, content, webpackImporter(
41
39
  resourcePath,
42
40
  pify(this.resolve.bind(this)),
package/package.json CHANGED
@@ -1,67 +1,68 @@
1
1
  {
2
2
  "name": "sass-loader",
3
- "version": "6.0.3",
3
+ "version": "6.0.7",
4
4
  "description": "Sass loader for webpack",
5
+ "author": "J. Tangelder",
6
+ "license": "MIT",
5
7
  "main": "lib/loader.js",
8
+ "files": [
9
+ "lib"
10
+ ],
6
11
  "scripts": {
12
+ "appveyor:test": "npm test",
7
13
  "create-spec": "node test/tools/runCreateSpec.js",
8
- "pretest": "npm run create-spec",
14
+ "lint": "eslint lib test",
9
15
  "test": "nyc --all mocha -R spec -t 10000",
10
- "posttest": "npm run lint",
11
16
  "test-bootstrap-sass": "webpack-dev-server --config test/bootstrapSass/webpack.config.js --content-base ./test/bootstrapSass",
12
17
  "test-source-map": "webpack-dev-server --config test/sourceMap/webpack.config.js --content-base ./test/sourceMap --inline",
13
18
  "test-watch": "webpack --config test/watch/webpack.config.js",
14
19
  "test-extract-text": "webpack --config test/extractText/webpack.config.js",
15
20
  "test-hmr": "webpack-dev-server --config test/hmr/webpack.config.js --content-base ./test/hmr --hot --inline",
16
- "lint": "eslint lib test",
17
- "appveyor:test": "npm test"
18
- },
19
- "keywords": [
20
- "sass",
21
- "libsass",
22
- "webpack",
23
- "loader"
24
- ],
25
- "repository": {
26
- "type": "git",
27
- "url": "git://github.com/webpack-contrib/sass-loader.git"
28
- },
29
- "author": "J. Tangelder",
30
- "license": "MIT",
31
- "engines": {
32
- "node": ">=4.0.0"
33
- },
34
- "peerDependencies": {
35
- "node-sass": "^4.0.0",
36
- "webpack": "^2.0.0"
21
+ "travis:lint": "npm run lint",
22
+ "travis:test": "npm run test",
23
+ "travis:coverage": "npm run test",
24
+ "pretest": "npm run create-spec",
25
+ "posttest": "npm run lint",
26
+ "release": "standard-version"
37
27
  },
38
28
  "dependencies": {
39
- "async": "^2.1.5",
40
- "clone-deep": "^0.2.4",
29
+ "clone-deep": "^2.0.1",
41
30
  "loader-utils": "^1.0.1",
42
31
  "lodash.tail": "^4.1.1",
43
- "pify": "^2.3.0"
32
+ "neo-async": "^2.5.0",
33
+ "pify": "^3.0.0"
44
34
  },
45
35
  "devDependencies": {
46
36
  "bootstrap-sass": "^3.3.5",
47
- "css-loader": "^0.26.1",
37
+ "css-loader": "^0.28.4",
48
38
  "eslint": "^3.16.0",
49
39
  "eslint-config-peerigon": "^9.0.0",
50
40
  "eslint-plugin-jsdoc": "^2.4.0",
51
- "file-loader": "^0.10.0",
41
+ "file-loader": "^0.11.2",
52
42
  "mocha": "^3.0.2",
53
43
  "node-sass": "^4.5.0",
54
- "nyc": "^10.1.2",
44
+ "nyc": "^11.0.2",
55
45
  "raw-loader": "^0.5.1",
56
46
  "should": "^11.2.0",
57
- "style-loader": "^0.13.1",
58
- "webpack": "^2.2.1",
47
+ "standard-version": "^4.2.0",
48
+ "style-loader": "^0.18.2",
59
49
  "webpack-dev-server": "^2.4.1",
60
- "webpack-merge": "^3.0.0"
50
+ "webpack-merge": "^4.0.0"
61
51
  },
62
- "files": [
63
- "lib",
64
- "README",
65
- "LICENSE"
66
- ]
52
+ "engines": {
53
+ "node": ">= 4.3 < 5.0.0 || >= 5.10"
54
+ },
55
+ "peerDependencies": {
56
+ "node-sass": "^4.0.0",
57
+ "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
58
+ },
59
+ "keywords": [
60
+ "sass",
61
+ "libsass",
62
+ "webpack",
63
+ "loader"
64
+ ],
65
+ "repository": "https://github.com/webpack-contrib/sass-loader.git",
66
+ "bugs": "https://github.com/webpack-contrib/sass-loader/issues",
67
+ "homepage": "https://github.com/webpack-contrib/sass-loader"
67
68
  }