Skip to content

Commit

Permalink
Merge pull request #995 from nextcloud/chore/noid/build-fix
Browse files Browse the repository at this point in the history
Move build to build-js
  • Loading branch information
susnux authored Jul 9, 2024
2 parents 41b21a6 + 9fa0489 commit 85a5ca8
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ nbproject
.php_cs.cache
node_modules
/vendor
/build
composer.phar
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions js/files_pdfviewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"private": true,
"scripts": {
"prebuild": "rm -rf js && npm run pdfjs:get",
"postbuild": "build/npm-post-build.sh",
"postbuild": "build-js/npm-post-build.sh",
"build": "webpack --node-env production --progress",
"dev": "webpack --node-env development --progress",
"watch": "webpack --node-env development --progress --watch",
Expand Down
13 changes: 12 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
const webpackConfig = require('@nextcloud/webpack-vue-config')
const WebpackSPDXPlugin = require('./build/WebpackSPDXPlugin.js')
// eslint-disable-next-line n/no-extraneous-require
const TerserPlugin = require('terser-webpack-plugin')
const WebpackSPDXPlugin = require('./build-js/WebpackSPDXPlugin.js')
const path = require('path')

webpackConfig.entry.workersrc = path.resolve(path.join('src', 'workersrc.js'))
Expand All @@ -12,6 +14,15 @@ webpackConfig.entry.public = path.resolve(path.join('src', 'public.js'))
// keep pdfjs vendor in the js folder
webpackConfig.output.clean = false

webpackConfig.optimization.minimizer = [new TerserPlugin({
extractComments: false,
terserOptions: {
format: {
comments: false,
},
},
})]

webpackConfig.plugins = [
...webpackConfig.plugins,
// Generate reuse license files
Expand Down

0 comments on commit 85a5ca8

Please sign in to comment.