strip-json-comments-loader

A Webpack loader for strip-json-comments

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
strip-json-comments-loader
0.0.28 years ago8 years agoMinified + gzip package size for strip-json-comments-loader in KB

Readme

strip-json-comments-loader for Webpack
The strip-json-comments-loader can be used in a Webpack configuration to remove javascript-style comments of the form ``/*...*/` or `//``. It is a wrapper of strip-json-comments.

Install

npm install strip-json-comments-loader webpack --save-dev

Usage

Though it was intended to allow comments in JSON definitions, it could be used in the pipeline of other cases where the javascript-style comments could not be mistaken for other symbols in the language, such as Css. Here is a web.config module doing so, for example: ``` javascript module.exports = { ... module: {
loaders: [
{
test: /\.scss$/,
loaders: ["style", "css", "sass", "strip-json-comments-loader"]
}
]
} }; ```

License

MIT (http://www.opensource.org/licenses/mit-license.php)