# node-sass-css-tilde-importer

> A node-sass customer importer which imports CSS files, also supporting tilde syntax to directly import from node_modules directory

Latest version **1.0.1** (published 2018-07-26) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install node-sass-css-tilde-importer
pnpm add node-sass-css-tilde-importer
yarn add node-sass-css-tilde-importer
bun add node-sass-css-tilde-importer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-07-26 |
| First published | 2018-07-26 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Manuel Rauber |
| Maintainers | manuelrauber |
| Keywords | node-sass, sass, scss, css, tilde, importer, sass-loader, node_modules |

## Links

- npm: https://www.npmjs.com/package/node-sass-css-tilde-importer
- Repository: https://github.com/ManuelRauber/node-sass-css-tilde-importer
- Homepage: https://github.com/ManuelRauber/node-sass-css-tilde-importer#readme
- Issues: https://github.com/ManuelRauber/node-sass-css-tilde-importer/issues
- npm.io page: https://npm.io/package/node-sass-css-tilde-importer

## Dependencies (1)

- [node-sass-tilde-importer](https://npm.io/package/node-sass-tilde-importer.md) ^1.0.2

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-07-26
- 1.0.0 — 2018-07-26

## README

# node-sass-css-tilde-importer

> A node-sass customer importer which imports CSS files, also supporting tilde syntax to directly import from node_modules directory

## Install

```sh
npm i -D node-sass-css-tilde-importer
```

## Usage

The `.css` extension triggers special behavior in Sass so you cannot import a file with a CSS extension. To work around this, you must use a special prefix on the import string and omit the extension.

```scss
@import "CSS:some_folder/some_css_file"
```

Usage of the module:

```js
const sass = require('node-sass'),
  cssImporter = require('node-sass-css-tilde-importer');

const result = sass.renderSync({ // Alternatively use "render()"
  importer: [cssImporter]
});
```

## Note

Please note, that using `node-sass-css-tilde-importer` does not add generic tilde support for scss files.
If you want to have this as well, you need to import [node-sass-tilde-importer](https://github.com/matthewdavidson/node-sass-tilde-importer) as well.
Luckily, `node-sass-css-tilde-importer` relies on `node-sass-tilde-importer` for tilde support.

```js
const sass = require('node-sass'),
  cssImporter = require('node-sass-css-tilde-importer'),
  tildeImporter = require('node-sass-tilde-importer');

const result = sass.renderSync({ // Alternatively use "render()"
  importer: [tidleImporter, cssImporter]
});
```

How is this different from node-sass-css-importer? Two things are different. The first is the additional tilde support for CSS files.
The second thing is the lack of `importPaths` (e.g. where the plugin automatically searches for css files with the given name).
With the `node-sass-css-tilde-importer` all files need to be references directly.

Please refer to the node-sass [readme](https://github.com/sass/node-sass#readme) for full instruction on how to use custom importers.

---
_Source: https://npm.io/package/node-sass-css-tilde-importer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
