# webpack-sass-autoloader

> imports sass files from particular directory and makes a sass file with all imports

Latest version **1.2.2** (published 2018-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-sass-autoloader
pnpm add webpack-sass-autoloader
yarn add webpack-sass-autoloader
bun add webpack-sass-autoloader
```

## 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.2.2 |
| Published | 2018-10-28 |
| First published | 2018-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lars Vanderheydt |
| Maintainers | larsvdheydt |
| Keywords | autoload, sass, webpack, auto-import, webpackplugin |

## Links

- npm: https://www.npmjs.com/package/webpack-sass-autoloader
- npm.io page: https://npm.io/package/webpack-sass-autoloader

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2018-10-28
- 1.2.1 — 2018-10-28
- 1.1.0 — 2018-10-28
- 1.0.2 — 2018-10-27
- 1.0.1 — 2018-10-27
- 1.0.0 — 2018-10-27

## README

# Webpack sass autoloader
> imports sass files from particular directory and makes a sass file with all imports

## Example
```npm i webpack-sass-autoloader```

```javascript
const WebpackSassAutoloader = require('webpack-sass-autoloader'); // import module

// add plugin to your webpack.config
new WebpackSassAutoloader('/src/sass/partials/')
```

```css
/* add file to style.scss */
@import './imports';
```

**When deleting a file, rerun webpack**
> this wil reset the imports file
The goal is to check it automatically but for now this will have to do.

### More info
The parameter is the directory it has to scan for all partials.
After the scan there will be a imports.scss in /src/sass/ directory.
The only thing you will have to do is add the imports.scss file in your main style.scss file.

If you have your webpack on --watch you won't have to restart your script, the only thing you'll need is to have your webpack rerun.
This can be achieved simply by saving another .scss file.
- add a space
- save file (webpack reruns)
- file was added to your imports

# Todo
check the [github board](https://github.com/LarsVanderheydt/webpack-sass-autoloader/projects/1)

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