Last active
February 14, 2017 20:40
-
-
Save g-patel/9d039d417018bd7abb8866f6b749a801 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = require('../config'); | |
var webpack = require('webpack'); | |
var merge = require('webpack-merge'); | |
var utils = require('./utils'); | |
var path = require('path'); | |
var projectRoot = path.resolve(__dirname, '../'); | |
var baseWebpackConfig = require('./webpack.common'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ENV = process.env.ENV = process.env.NODE_ENV = 'production'; | |
module.exports = merge(baseWebpackConfig, { | |
entry: { | |
app: './src/index.js' | |
}, | |
externals: { | |
'lodash': 'lodash', | |
}, | |
resolve: { | |
alias: { | |
'vue$': 'vue/dist/vue.runtime.min', | |
} | |
}, | |
module: { | |
loaders: utils.styleLoaders({ extract: true }) | |
}, | |
output: { | |
library: 'grpn-wh-components', | |
libraryTarget: 'umd', | |
umdNamedDefine: true | |
}, | |
vue: { | |
loaders: utils.cssLoaders({ | |
extract: true | |
}) | |
}, | |
plugins: [ | |
new webpack.DefinePlugin({ | |
'process.env': { | |
NODE_ENV: '"production"' | |
} | |
}), | |
new ExtractTextPlugin('../lib/grpn-wh-components.css'), | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment