Rollup vs webpack vs browserify....what a mess

Hey all.

I understand that everyone has their own preferences around what tools to use for what purpose.
Admittedly, I have lost track of where we’re at in the decision process, but it feels like a constantly moving target, with little transparency.

What would help is an illustration of the process flow of the tools currently included (webpack via app-scripts…gulp?) and when they take effect. Especially in light of heterogeneous environments that need to consider custom libraries/sources, eg. fonts, own CSS stacks, JS libs (w/o npm support) etc.

Examples of setups and configurations would certainly help to avoid wasting time poking in the dark.

Happy preXmas season.


1 Like

The build uses Webpack by default, but you can choose Rollup if you prefer. The ionic-app-scripts project has some documentation.

Not really a “mess”, since the end user does not have to touch any of that stuff.
The default build tool is webpack, and that is all managed by app-scripts

Agreed. There is some documentation on app-scripts, which is a good start. Unfortunately, the web, GIT, forums, are fully of a gazillion solutions to customize the build process reintroducing gulp and what not.

This is useful as a starting point.

Speaking of which, if I define a custom copy config:

"ionic_copy": "./config/copy.config.js"

‘copy’ appears to run twice, once with the default config and once with the newly provided config file.

Not good. Can this be turned off?

EDIT: Just noticed it’s a feature, as the config object expects to see the exact same attributes, otherwise it’s being added to copy tasks.