mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
* Fix issues on paths in build and dev files * Skip yarn to reduce tooling requirements * Minify CSS assets in production * Reduce imports on fonts, hardcode font pieces more. There are problems with the font family names. Roboto mixin brings in everything as `Roboto-Slab-Bold`, which won't match local font name of 'Roboto Slab' * Fix the development instance more: * Add file watching on reST files * Execute build docs command after webpack build Things I'm still not sure about: - [ ] The actual JS output, I haven't vetted this yet - [ ] If woff2 and woff are enough for fonts. The NPM packages are missing other formats
12 lines
374 B
JavaScript
12 lines
374 B
JavaScript
const merge = require('webpack-merge');
|
|
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
const common = require('./webpack.common.js');
|
|
|
|
module.exports = merge(common, {
|
|
mode: 'production',
|
|
optimization: {
|
|
minimizer: [new TerserPlugin(), new OptimizeCssAssetsPlugin({})],
|
|
},
|
|
});
|