hedgedoc/webpack.prod.js
Enrico Guiraud 23c7b5b0a6
Fix urlPath support, let CodiMD be served from a subpath correctly
Webpack now uses relative paths for resources linked from by static
snippets. A templated <base> tag has been introduced in headers
so app.js can set the base URL at runtime.

Signed-off-by: Enrico Guiraud <enrico.guiraud@cern.ch>
2019-12-20 12:03:16 +01:00

23 lines
596 B
JavaScript

const common = require('./webpack.common.js')
const htmlexport = require('./webpack.htmlexport')
const merge = require('webpack-merge')
const path = require('path')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
module.exports = [
merge(common, {
mode: 'production',
output: {
path: path.join(__dirname, 'public/build'),
publicPath: 'build/',
filename: '[name].[contenthash].js'
}
}),
merge(htmlexport, {
mode: 'production',
optimization: {
minimizer: [
new OptimizeCSSAssetsPlugin({})
]
}
})]