Browse Source
Fix build
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/5793/head
John Molakvoæ (skjnldsv)
4 years ago
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
3 changed files with
374 additions and
1543 deletions
-
.github/workflows/node.yml
-
package-lock.json
-
webpack.js
|
|
@ -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 )" |
|
|
@ -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 |