Socket
Socket
Sign inDemoInstall

sass-loader

Package Overview
Dependencies
Maintainers
4
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-loader - npm Package Compare versions

Comparing version 6.0.3 to 6.0.4

4

CHANGELOG.md
Changelog
---------
### 6.0.4
- fix: Resolving of scoped npm packages [#447](https://github.com/webpack-contrib/sass-loader/pull/447)
### 6.0.3

@@ -5,0 +9,0 @@

2

lib/formatSassError.js

@@ -65,3 +65,3 @@ "use strict";

content.split(os.EOL)[err.line - 1] + os.EOL +
new Array(err.column - 1).join(" ") + "^" + os.EOL +
new Array(Math.max(err.column - 1, 0)).join(" ") + "^" + os.EOL +
" ";

@@ -68,0 +68,0 @@ } catch (err) {

@@ -32,4 +32,5 @@ "use strict";

// a module import is an identifier like 'bootstrap-sass'
// Firstly check whether we importing scoped npm package (i.e. "@org/pkg")
// We also need to check for dirname since it might also be a deep import like 'bootstrap-sass/something'
const isModuleImport = request.charAt(0) !== "." && dirname === ".";
const isModuleImport = dirname.charAt(0) === "@" && dirname.length > 1 ? true : request.charAt(0) !== "." && dirname === ".";
const hasCssExt = ext === ".css";

@@ -36,0 +37,0 @@ const hasSassExt = ext === ".scss" || ext === ".sass";

{
"name": "sass-loader",
"version": "6.0.3",
"version": "6.0.4",
"description": "Sass loader for webpack",

@@ -5,0 +5,0 @@ "main": "lib/loader.js",

@@ -14,10 +14,12 @@ [![npm][npm]][npm-url]

<a href="https://github.com/webpack/webpack">
<img height="100"
src="https://github.com/webpack/media/raw/master/logo/logo-on-white-bg.png?raw=true">
<img width="200" height="200"
src="https://webpack.js.org/assets/icon-square-big.svg">
</a>
<h1>sass-loader</h1>
<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>
<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>
<h1>SASS Loader</h1>
<p>Loads a SASS/SCSS file and and compiles it to CSS.</p>
</div>
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.
Looking for the webpack 1 loader? Check out the [archive/webpack-1 branch](https://github.com/webpack-contrib/sass-loader/tree/archive/webpack-1).
<h2 align="center">Install</h2>

@@ -29,3 +31,3 @@

The sass-loader requires [node-sass](https://github.com/sass/node-sass) and [webpack](https://github.comwebpack)
The sass-loader requires [node-sass](https://github.com/sass/node-sass) and [webpack](https://github.com/webpack)
as [`peerDependency`](https://docs.npmjs.com/files/package.json#peerdependencies). Thus you are able to control the versions accurately.

@@ -99,3 +101,3 @@

test: /\.scss$/,
loader: extractSass.extract({
use: extractSass.extract({
use: [{

@@ -121,6 +123,6 @@ loader: "css-loader"

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:
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:
```css
@import "~bootstrap/css/bootstrap";
@import "~bootstrap/dist/css/bootstrap";
```

@@ -198,21 +200,16 @@

<table>
<tbody>
<tr>
<td align="center">
<img width="150 height="150"
src="https://avatars0.githubusercontent.com/u/781746?v=3"><br>
<a href="https://github.com/jhnns"><img width="150" height="150" src="https://avatars0.githubusercontent.com/u/781746?v=3"></a><br>
<a href="https://github.com/jhnns">Johannes Ewald</a>
</td>
<td align="center">
<img width="150 height="150"
src="https://avatars1.githubusercontent.com/u/1243901?v=3&s=460"><br>
<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>
<a href="https://github.com/webpack-contrib">Jorik Tangelder</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars1.githubusercontent.com/u/3403295?v=3"><br>
<a href="https://github.com/akiran"><img width="150" height="150" src="https://avatars1.githubusercontent.com/u/3403295?v=3"></a><br>
<a href="https://github.com/akiran">Kiran</a>
</td>
<tr>
<tbody>
</table>

@@ -244,3 +241,3 @@

[chat]: https://badges.gitter.im/webpack-contrib/webpack.svg
[chat-url]: https://gitter.im/webpack-contrib/webpack
[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc