diff --git a/.github/workflows/pull-checks.yml b/.github/workflows/pull-checks.yml index 6d71ea09d..46305c553 100644 --- a/.github/workflows/pull-checks.yml +++ b/.github/workflows/pull-checks.yml @@ -139,7 +139,7 @@ jobs: if [ $(git diff --name-only package.json | wc -l) -gt 0 ]; then echo '::error file=package.json::The package.json file is not validly formatted.' - echo '::notice::It is suggested to run `npm run package/lint`.' + echo '::notice::It is suggested to run `npm run package-lint` and commit locally.' exit 1 fi diff --git a/CHANGELOG.md b/CHANGELOG.md index f708d1831..c6039bff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ - Allow for PlantUML diagrams in documentation [#1229](https://github.com/nextcloud/cookbook/pull/1229) @christianlupus - Remove deprecated `::v-deep` CSS syntax @christianlupus +- Disable webpack bundle analyzer plugin by default to speed up development cycle + [#1263](https://github.com/nextcloud/cookbook/pull/1263) @MarcelRobitaille ### Documentation - Fix bad writing diff --git a/docs/dev/frontend/webpack-bundle-analyzer.md b/docs/dev/frontend/webpack-bundle-analyzer.md index f11dc9d27..ae90e6921 100644 --- a/docs/dev/frontend/webpack-bundle-analyzer.md +++ b/docs/dev/frontend/webpack-bundle-analyzer.md @@ -4,7 +4,7 @@ The Webpack Bundle Analyzer Plugin is installed as a development dependency (see ## Usage -The interactive view of the treemap is available at `http://localhost:8888` while running `npm run dev` in the terminal. +The interactive view of the treemap is available at `http://localhost:8888` while running `npm run build-bundle-analyzer` in the terminal. ![Bundle Analyzer example](assets/webpack-bundle-analyzer_example.png) diff --git a/package.json b/package.json index 93814d1da..e8bb83232 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "main": "src/main.js", "scripts": { "build": "npx webpack --node-env production --progress --config webpack.config.js", - "build-dev": "npx webpack --node-env development --progress --config webpack.config.js", + "build-bundle-analyzer": "npx webpack --node-env development --progress --config webpack.devel.js --env BUNDLE_ANALYZER=true", + "build-dev": "npx webpack --node-env development --progress --config webpack.devel.js", "dev": "npx webpack --node-env development --progress --watch --config webpack.devel.js", "eslint": "npx eslint --cache --cache-strategy content 'src/**/*.{vue,js}'", "eslint-fix": "npx eslint --cache --cache-strategy content --fix 'src/**/*.{vue,js}'", diff --git a/webpack.devel.js b/webpack.devel.js index a51a47e36..df69e104c 100644 --- a/webpack.devel.js +++ b/webpack.devel.js @@ -3,11 +3,11 @@ const base = require('./webpack.config.js') const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin module.exports = (env) => merge(base(env), { - plugins: [ + plugins: env.BUNDLE_ANALYZER ? [ new BundleAnalyzerPlugin( { - openAnalyzer: false, + openAnalyzer: true, } ) - ], + ] : [], })