mermaid/webpack.config.prod.js

19 lines
642 B
JavaScript
Raw Normal View History

2017-04-22 16:04:16 +08:00
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import { webConfig, nodeConfig, lessConfig } from './webpack.config.base.js'
2017-04-16 21:38:48 +08:00
2017-04-22 17:12:12 +08:00
const minConfig = webConfig()
minConfig.output.filename = '[name].min.js'
2017-04-16 21:38:48 +08:00
2017-04-22 17:12:12 +08:00
const slimMinConfig = webConfig()
slimMinConfig.externals = ['fs', 'd3']
slimMinConfig.output.filename = '[name].slim.min.js'
2017-04-16 21:38:48 +08:00
2017-04-22 17:12:12 +08:00
const apiMinConfig = nodeConfig()
apiMinConfig.output.filename = '[name].min.js'
2017-04-16 21:38:48 +08:00
2017-04-22 17:12:12 +08:00
const cssMinConfig = lessConfig()
cssMinConfig.output.filename = '[name].min.css'
cssMinConfig.plugins = [ new ExtractTextPlugin('[name].min.css') ]
2017-04-22 16:04:16 +08:00
2017-04-22 17:12:12 +08:00
export default [minConfig, slimMinConfig, apiMinConfig, cssMinConfig]