ivi icon indicating copy to clipboard operation
ivi copied to clipboard

Bundling with parcel

Open brieucp opened this issue 5 years ago • 3 comments

Hi,

I have some issue bundling ivi with Parcel due to the use of IVI_DEBUG and IVI_TARGET. I didn't find an equivalent of DefinePlugin for Parcel and even if there is, I think it would be better to use an other way to define this constant.

process.env would be nice. Still configurable with Define Plugin with almost no change and also with environment variable or dotenv.

Thanks.

brieucp avatar Mar 15 '19 08:03 brieucp

I didn't even remember why I've switched to global variables, probably I had some issues with closure compiler long time ago. I'll change it to process.env.NODE_ENV and process.env.IVI_TARGET.

localvoid avatar Mar 15 '19 09:03 localvoid

Great, thanks :)

brieucp avatar Mar 15 '19 09:03 brieucp

Published new version.

Tried to build hello world example with parcel and --experimental-scope-hoisting, and it is seems that it is unable to treeshake many unused functions.

localvoid avatar Mar 15 '19 11:03 localvoid