strip-json-comments-loader
v0.0.2
Published
A Webpack loader for strip-json-comments
Downloads
1,392
Maintainers
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:
module.exports = {
...
module: {
loaders: [
{
test: /\.scss$/,
loaders: ["style", "css", "sass", "strip-json-comments-loader"]
}
]
}
};
License
MIT (http://www.opensource.org/licenses/mit-license.php)