Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 28 days 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 (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-15T06:31:25.000Z (over 7 years ago)
- Last Synced: 2024-10-06T22:35:29.441Z (about 1 month 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
===================
[![npm version](https://badge.fury.io/js/css-sourcemaps-webpack-plugin.svg)](http://badge.fury.io/js/css-sourcemaps-webpack-plugin) [![Dependency Status](https://david-dm.org/jantimon/css-sourcemaps-webpack-plugin.svg)](https://david-dm.org/jantimon/css-sourcemaps-webpack-plugin) [![Build status](https://travis-ci.org/jantimon/css-sourcemaps-webpack-plugin.svg)](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})]
}
```