Skip to content

Simple CSS Sourcemap configuration for CSS, Less, Stylus and Sass

Notifications You must be signed in to change notification settings

jantimon/css-sourcemaps-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS Sourcemap Webpack Plugin

npm version Dependency Status Build status

This is a webpack plugin that simplifies the usage of CSS source maps.

Installation

Install the plugin with npm:

$ npm install css-sourcemaps-webpack-plugin --save-dev

Usage

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:

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})]
}

About

Simple CSS Sourcemap configuration for CSS, Less, Stylus and Sass

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published