mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
Esbuild (#10940)
* ci: add minimum GitHub token permissions for workflows Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io> * feat: use esbuild for minification Co-authored-by: Ashish Kurmi <akurmi@stepsecurity.io>
This commit is contained in:
committed by
GitHub
parent
1b89b6615c
commit
02ef3e974c
3
.github/workflows/docker.yml
vendored
3
.github/workflows/docker.yml
vendored
@@ -11,6 +11,9 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
8
.github/workflows/test.yaml
vendored
8
.github/workflows/test.yaml
vendored
@@ -14,8 +14,14 @@ defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
permissions:
|
||||
checks: write # for coverallsapp/github-action to create new checks
|
||||
contents: read # for actions/checkout to fetch code
|
||||
name: Lint and test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -194,6 +200,8 @@ jobs:
|
||||
parallel: true
|
||||
|
||||
finish:
|
||||
permissions:
|
||||
checks: write # for coverallsapp/github-action to create new checks
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"csurf": "1.11.0",
|
||||
"daemon": "1.1.0",
|
||||
"diff": "5.1.0",
|
||||
"esbuild": "0.15.10",
|
||||
"express": "4.18.1",
|
||||
"express-session": "1.17.3",
|
||||
"express-useragent": "1.0.15",
|
||||
@@ -129,6 +130,7 @@
|
||||
"sortablejs": "1.15.0",
|
||||
"spdx-license-list": "6.6.0",
|
||||
"spider-detector": "2.0.0",
|
||||
"terser-webpack-plugin": "5.3.6",
|
||||
"textcomplete": "0.18.2",
|
||||
"textcomplete.contenteditable": "0.1.1",
|
||||
"timeago": "1.6.7",
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
const { merge } = require('webpack-merge');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
const common = require('./webpack.common');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
minify: TerserPlugin.esbuildMinify,
|
||||
terserOptions: {},
|
||||
}),
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user