Browse Source

Fix build

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/5793/head
John Molakvoæ (skjnldsv) 4 years ago
parent
commit
e8c666c128
No known key found for this signature in database GPG Key ID: 60C25B8C072916CF
  1. 34
      .github/workflows/node.yml
  2. 1871
      package-lock.json
  3. 12
      webpack.js

34
.github/workflows/node.yml

@ -0,0 +1,34 @@
name: Node
on:
pull_request:
push:
branches:
- master
- stable*
jobs:
build:
runs-on: ubuntu-latest
name: node
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Set up npm7
run: npm i -g npm@7
- name: Install dependencies & build
run: |
npm ci
npm run build --if-present
- name: Check webpack build changes
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )"

1871
package-lock.json
File diff suppressed because it is too large
View File

12
webpack.js

@ -2,6 +2,7 @@ const path = require('path')
const webpackConfig = require('@nextcloud/webpack-vue-config')
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
const TerserPlugin = require('terser-webpack-plugin')
webpackConfig.entry = {
'admin-settings': path.join(__dirname, 'src', 'mainAdminSettings.js'),
@ -60,4 +61,15 @@ webpackConfig.module.rules.push({
},
})
webpackConfig.optimization.minimizer = [
new TerserPlugin({
terserOptions: {
output: {
comments: false,
},
},
extractComments: false,
}),
]
module.exports = webpackConfig
Loading…
Cancel
Save