mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
chore: migrate to Yarn 2 (#2316)
* chore: migrate to Yarn 2 * Update config.yml
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
// @flow
|
||||
const path = require('path');
|
||||
// $FlowIgnore
|
||||
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");
|
||||
|
||||
// $FlowIgnore
|
||||
const browserslist = require('browserslist')();
|
||||
// $FlowIgnore
|
||||
const caniuse = require('caniuse-lite');
|
||||
|
||||
// from the least supported to the most supported
|
||||
@@ -61,9 +67,11 @@ function createConfig(target /*: Target */, dev /*: boolean */,
|
||||
options: {importLoaders: 1},
|
||||
}, {
|
||||
loader: 'postcss-loader',
|
||||
// $FlowIgnore
|
||||
options: {plugins: [require('postcss-preset-env')()]},
|
||||
}];
|
||||
if (minimize) {
|
||||
// $FlowIgnore
|
||||
cssLoaders[1].options.plugins.push(require('cssnano')());
|
||||
}
|
||||
|
||||
@@ -160,6 +168,12 @@ function createConfig(target /*: Target */, dev /*: boolean */,
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
resolve: {
|
||||
plugins: [PnpWebpackPlugin],
|
||||
},
|
||||
resolveLoader: {
|
||||
plugins: [PnpWebpackPlugin.moduleLoader(module)],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user