1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 08:45:28 +03:00

Rollup improvements (#3179)

* update rollup to latest
* update all plugins to latest
* enable sourcemaps
* use vendor.js file for all 3rd party scripts
This commit is contained in:
Tomas Chmelevskij 2022-12-29 14:42:36 +01:00 committed by GitHub
parent 6e88558744
commit 039727ac23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 107 additions and 74 deletions

View file

@ -434,6 +434,19 @@ function dist_rollup() {
// `[name]` will be replaced with it creating directories
// accordingly inside of `dist`
entryFileNames: '[name].js',
// anything what's not an entry will have the same name
// no hashing since we are not web app and don't care
// about cache busting
chunkFileNames: '[name].js',
// we want to see code in the same way as it
// is in the source files while debugging
sourcemap: true,
// put any 3rd party module in vendor.js
manualChunks(id) {
if (id.includes('node_modules')) {
return 'vendor';
}
},
dir: DIST_DIR,
}),
);