mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
chore(deps): update to webpack 5 (#2664)
Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
@@ -4,8 +4,6 @@ const path = require('path');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
// $FlowIgnore
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
// $FlowIgnore
|
||||
const PnpWebpackPlugin = require('pnp-webpack-plugin');
|
||||
|
||||
const {version} = require("./package.json");
|
||||
|
||||
@@ -106,6 +104,7 @@ function createConfig(target /*: Target */, dev /*: boolean */,
|
||||
libraryExport: 'default',
|
||||
// Enable output modules to be used in browser or Node.
|
||||
// See: https://github.com/webpack/webpack/issues/6522
|
||||
// https://github.com/webpack/webpack/pull/11987
|
||||
globalObject: "(typeof self !== 'undefined' ? self : this)",
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
publicPath: dev ? '/' : '',
|
||||
@@ -168,12 +167,8 @@ function createConfig(target /*: Target */, dev /*: boolean */,
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
resolve: {
|
||||
plugins: [PnpWebpackPlugin],
|
||||
},
|
||||
resolveLoader: {
|
||||
// $FlowIgnore
|
||||
plugins: [PnpWebpackPlugin.moduleLoader(module)],
|
||||
stats: {
|
||||
colors: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user