summaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-03-17 06:45:45 +0100
committerGitHub <noreply@github.com>2023-03-17 01:45:45 -0400
commit96be0cb6e3ac4e0ac158e9f64c5d44b2a5140a9a (patch)
tree898d2a4dec4770ae75762097c06930e0cb517cee /webpack.config.js
parent12ddc48c5c02123b1e6dab9d2d38b03f027d196e (diff)
downloadgitea-96be0cb6e3ac4e0ac158e9f64c5d44b2a5140a9a.tar.gz
gitea-96be0cb6e3ac4e0ac158e9f64c5d44b2a5140a9a.zip
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>
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/webpack.config.js b/webpack.config.js
index ec8a195940..4949ed6a68 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -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
}),