Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mortenson/emit-file-loader
A Webpack loader that emits a file during the loader chain.
https://github.com/mortenson/emit-file-loader
Last synced: about 1 month ago
JSON representation
A Webpack loader that emits a file during the loader chain.
- Host: GitHub
- URL: https://github.com/mortenson/emit-file-loader
- Owner: mortenson
- Created: 2018-03-12T05:59:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T20:44:30.000Z (about 6 years ago)
- Last Synced: 2024-11-10T04:21:42.905Z (about 2 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# emit-file-loader
A Webpack loader that emits a file during the loader chain.
This is useful when distributing CSS or template files for others to use.
To use this loader, add it to an existing chain like so:
```
{
test: /\.scss$/,
use: [
{ loader: 'css-loader' },
{ loader: 'emit-file-loader?output=dist/styles/[name].css' },
{ loader: 'sass-loader' }
],
}
```The `output` query parameter uses [name interpolation](https://github.com/webpack/loader-utils#interpolatename)
to determine where the raw content will be saved by the loader.# Installation
```
npm install --save-dev emit-file-loader
```