Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-plugin-sass

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-sass - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

5

index.js

@@ -112,3 +112,4 @@ "use strict";

// Compile SASS to CSS
let css = (await sassRender({ ...customSassOptions, file: sourceFullPath })).css.toString();
const sassRenderResult = await sassRender({ ...customSassOptions, file: sourceFullPath });
let css = sassRenderResult.css.toString();
// Replace all relative urls

@@ -120,3 +121,3 @@ css = await replaceUrls(css, tmpFilePath, sourceDir, rootDir, external_1.compilePatterns(external));

path: tmpFilePath,
watchFiles: [sourceFullPath],
watchFiles: sassRenderResult.stats.includedFiles,
};

@@ -123,0 +124,0 @@ });

2

package.json
{
"name": "esbuild-plugin-sass",
"version": "0.6.0",
"version": "0.7.0",
"description": "Plugin for esbuild to support SASS styles",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,7 +5,7 @@ # esbuild-plugin-sass

Plugin for [esbuild](https://esbuild.github.io/) to support SASS styles
Plugin for [esbuild](https://esbuild.github.io/) to support Sass style sheets
## Install
```bash
```shell
npm i esbuild esbuild-plugin-sass

@@ -29,3 +29,3 @@ ```

```js
import './test.scss'
import "./test.scss";
```

@@ -36,11 +36,13 @@

```js
const esbuild = require('esbuild');
const sassPlugin = require('esbuild-plugin-sass')
const esbuild = require("esbuild");
const sassPlugin = require("esbuild-plugin-sass");
esbuild.build({
entryPoints: ['src/index.js'],
esbuild
.build({
entryPoints: ["src/index.js"],
bundle: true,
outfile: 'bundle.js',
outfile: "bundle.js",
plugins: [sassPlugin()],
}).catch((e) => console.error(e.message))
})
.catch((e) => console.error(e.message));
```

@@ -50,4 +52,4 @@

```bash
node build.js
```console
$ node build.js
```

@@ -71,7 +73,7 @@

interface Options {
rootDir?: string
customSassOptions?: Omit<sass.Options, 'file'>
rootDir?: string;
customSassOptions?: Omit<sass.Options, "file">;
}
export = (options: Options = {}) => Plugin
export = (options: Options = {}) => Plugin;
```

@@ -81,4 +83,3 @@

- `rootDir` - folder to resolve pathes against
- `rootDir` - folder to resolve paths against
- `customSassOptions` - options object passed to `sass` [render](https://sass-lang.com/documentation/js-api#render) function, except `file` option, which is overriden by plugin for each processed file

Sorry, the diff of this file is not supported yet

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