forked from MarquezProject/marquez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.js
32 lines (30 loc) · 1.05 KB
/
webpack.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
const { merge } = require('webpack-merge')
const webpack = require('webpack')
const webpackShared = require('./webpack.common.js')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpackProd = {
mode: 'production',
devtool: 'source-map',
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
title: 'Telescope Web',
hash: true,
minify: true,
inject: false,
template: 'src/index.prod.html',
favicon: 'src/img/favicon.png'
}),
new webpack.DefinePlugin({
__DEVELOPMENT__: JSON.stringify(false),
__NODE_ENV__: JSON.stringify('production'),
__API_URL__: JSON.stringify('/api/v1'),
__TEMP_ACTOR_STR__: JSON.stringify('me'),
__ROLLBAR__: JSON.stringify(true),
__FEEDBACK_FORM_URL__: JSON.stringify('https://forms.gle/f3tTSrZ8wPj3sHTA7'),
__API_DOCS_URL__: JSON.stringify('https://marquezproject.github.io/marquez/openapi.html')
})
]
}
module.exports = merge(webpackShared, webpackProd)