UNPKG

jss-cache

Version:

JSS plugin that caches the rules and delivers insane performance.

33 lines (28 loc) 616 B
'use strict' var webpack = require('webpack') var 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()) } module.exports = { output: { library: 'jssCache', libraryTarget: 'umd' }, plugins: plugins, module: { loaders: [ { loader: 'babel-loader', test: /\.js$/, exclude: /node_modules/ } ] } }