Z
Z
zwezew2019-02-07 21:15:11
JavaScript
zwezew, 2019-02-07 21:15:11

Is it possible to work with webpack js from outside?

Is it possible to configure the output of js files during assembly in such a way that in the future it would be possible to connect an external js file, the code in which could interact with the one inside the minified webpack, for example, with plugins?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex, 2019-02-07
@zwezew

if you need to use the code of the bundle itself outside the bundle, use the option group

output.library
output.libraryExport
output.libraryTarget
here is an example
if you need to get access to external variables inside the bundle, for example, all sorts of jikveri, lodas that are connected via CDN, etc. use externals

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question