Is there a way to add external plugins?
ducdebreme opened this issue · 2 comments
I would like to use external libraries such as jQuery oder underscore.js inside my components, but without compiling them into the resulting component module.
Webpack offers the externals
directive for this. (see https://webpack.js.org/configuration/externals/)
I tried to add it into poi.config.js
or styleguide.config.js
, but I was not successful. (I was following this https://poi.js.org/#/home?id=webpack)
Do you have an idea, how it could be achieved? I think it will be of great use for many people.
It's working here,
If you build with commonjs (the default npm run build
behavior), by default it does not include the jquery library (even without the external option).
I created this commit as example from the template (with vue init): klarkc/ext-cmp@71231c3
I just installed jquery normally, added the externals in poi.config.js
and built with npm run build:umd
. (see the generated file size, comment the externals and try again 2.27kB vs 89.1kB)
Let me know if there is anything else. Closing.