https://github.com/jantimon/css-sourcemaps-webpack-plugin
Simple CSS Sourcemap configuration for CSS, Less, Stylus and Sass
https://github.com/jantimon/css-sourcemaps-webpack-plugin
css sourcemaps webpack
Last synced: 6 months ago
JSON representation
Simple CSS Sourcemap configuration for CSS, Less, Stylus and Sass
- Host: GitHub
- URL: https://github.com/jantimon/css-sourcemaps-webpack-plugin
- Owner: jantimon
- Created: 2016-01-12T21:48:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-15T06:31:25.000Z (over 8 years ago)
- Last Synced: 2024-12-20T06:31:30.258Z (7 months ago)
- Topics: css, sourcemaps, webpack
- Language: JavaScript
- Size: 5.86 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CSS Sourcemap Webpack Plugin
===================
[](http://badge.fury.io/js/css-sourcemaps-webpack-plugin) [](https://david-dm.org/jantimon/css-sourcemaps-webpack-plugin) [](https://travis-ci.org/jantimon/css-sourcemaps-webpack-plugin)This is a [webpack](http://webpack.github.io/) plugin that simplifies the usage
of CSS source maps.Installation
------------
Install the plugin with npm:
```shell
$ npm install css-sourcemaps-webpack-plugin --save-dev
```Usage
-----------```javascript
var CssSourcemapPlugin = require('css-sourcemaps-webpack-plugin');
module.exports = {
entry: 'index.js',
output: {
path: 'dist',
filename: 'index_bundle.js'
},
module: {
loaders: [
{ test: /\.less$/, loader: 'style!css!less' }
]
},
plugins: [new CssSourcemapPlugin()]
}
```Production
-----------You can easily **disable the plugin** for your production build:
```js
var CssSourcemapPlugin = require('css-sourcemaps-webpack-plugin');
module.exports = {
entry: 'index.js',
output: {
path: 'dist',
filename: 'index_bundle.js'
},
module: {
loaders: [
{ test: /\.scss$/, loader: 'style!css!sass' }
]
},
plugins: [new CssSourcemapPlugin({disabled: true})]
}
```