-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
webpack.config.prod.js
42 lines (42 loc) · 1.11 KB
/
webpack.config.prod.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var path = require('path')
var merge = require('webpack-merge')
var baseConfig = require('./webpack.config.base')
var MiniCssExtractPlugin = require('mini-css-extract-plugin')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const webpack = require('webpack')
module.exports = merge(baseConfig, {
mode: 'production',
entry: './src/index.js',
output: {
library: 'adaptivecards-vue',
libraryTarget: 'umd',
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'adaptivecards-vue.js'
},
externals: {
'vue': 'Vue',
'adaptivecards': 'adaptivecards',
'adaptivecards-templating': 'adaptivecards-templating',
'adaptive-expressions': 'adaptive-expressions'
},
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader'
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'adaptivecards-vue.css'
}),
new BundleAnalyzerPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
]
})