Skip to content

vite enhancement: better filter dependencies

Gabriele De Blasi requested to merge wip-vite-externals into master

Without the external filter function in the Vite rollupOptions the nodash.delay function was bundled together with the source code.

Applying it, the nodash dependency is imported and used as below:

  • CommonJS (dist/mfilter.cjs) -> const $=require("@cern/nodash") ... $.delay(0)

  • ECMAScript (dist/mfilter.js) -> import { delay as $ } from "@cern/nodash" ... delay(0)

Edited by Gabriele De Blasi

Merge request reports