UNPKG

jss-isolate

Version:

True rules isolation through automatic properties reset.

38 lines (33 loc) 687 B
'use strict' const webpack = require('webpack') const plugins = [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), __DEV__: process.env.NODE_ENV === 'development', __TEST__: process.env.NODE_ENV === 'test' }) ] if (process.env.NODE_ENV === 'production') { plugins.push(new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } })) } module.exports = { output: { library: 'jssIsolate', libraryTarget: 'umd' }, plugins, module: { loaders: [ { loader: 'babel-loader', test: /\.js$/, exclude: /node_modules/ } ] }, devtool: 'source-map' }