Ask for help on using webpack in jsp or freemarker projects

traditional multi-page projects use html-webpack-plugin to load jsp or ftl files, because there is a special syntax inside, so directly using html-webpack-plugin will fail to package, and then use raw-loader on the basis of html-webpack-plugin to package ok.

but there is a problem. html-webpack-plugin uses ejs syntax by default, so that < div class= "banner" style= "background-image: url (${require (".. /.. / assets/images/common/banner_4.png")})" > < / div > can be used in html, but html-webpack-plugin loses this ability after adding raw-loader . The problem with

now is that I can"t strike a balance between ${require ()} and raw-loader . Do you have an old driver?

clipboard.png

Jul.14,2022

has been solved. I have extended raw-loader to have the ability to deal with pictures


Why not change the way of thinking: if build's good js is introduced into the template file, the template file should be handed over to Java to deal with

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2530c-15c8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2530c-15c8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?