1
0
Fork 0
forked from forgejo/forgejo

Update JS dependencies, Require Node.js 16 (#23528)

- Update all JS dependencies
- Require Node.js 16 as dictated by `esbuild-loader`
- Regenerate SVG
- Adapt to `esbuild-loader` breaking changes
- Minor refactor in `webpack.config.js`
- Tested build, monaco and swagger-ui

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
silverwind 2023-03-17 06:45:45 +01:00 committed by GitHub
parent 12ddc48c5c
commit 96be0cb6e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 1520 additions and 1409 deletions

View file

@ -11,8 +11,8 @@ import webpack from 'webpack';
import {fileURLToPath} from 'node:url';
import {readFileSync} from 'node:fs';
const {ESBuildMinifyPlugin} = EsBuildLoader;
const {SourceMapDevToolPlugin} = webpack;
const {EsbuildPlugin} = EsBuildLoader;
const {SourceMapDevToolPlugin, DefinePlugin} = webpack;
const formatLicenseText = (licenseText) => wrapAnsi(licenseText || '', 80).trim();
const glob = (pattern) => fastGlob.sync(pattern, {
@ -90,7 +90,7 @@ export default {
optimization: {
minimize: isProduction,
minimizer: [
new ESBuildMinifyPlugin({
new EsbuildPlugin({
target: 'es2015',
minify: true,
css: true,
@ -130,7 +130,8 @@ export default {
{
loader: 'esbuild-loader',
options: {
target: 'es2015'
loader: 'js',
target: 'es2015',
},
},
],
@ -173,7 +174,7 @@ export default {
],
},
plugins: [
new webpack.DefinePlugin({
new DefinePlugin({
__VUE_OPTIONS_API__: true, // at the moment, many Vue components still use the Vue Options API
__VUE_PROD_DEVTOOLS__: false, // do not enable devtools support in production
}),