Skip to content

Tag: webpack

can javascript be inline with webpack?

I need to import a library to my project, the library should is a javascript file, which need to be inlined to html. for example: library code: I need to make this code inline in html. html: can I implement this with webpack? I find script-loader, but it run the script, not make it inline. Answer At last, we …

Passing environment-dependent variables in webpack

I’m trying to convert an angular app from gulp to webpack. in gulp I use gulp-preprocess to replace some variables in the html page (e.g. database name) depending on the NODE_ENV. What is the best way of achieving a similar result with webpack? Answer There are two basic ways to achieve this. DefinePlug…