You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to bundle all of app's templates, styles and scripts into one single .js file, that can be exported as a library and attached to another HTML file and load?
#1820
Open
ar-IGT opened this issue
Aug 17, 2023
· 0 comments
And this config is used to build scripts, styles and templates (as HTML files), put separately in directories.
Then, scripts and styles are attached in HTML files built from .ejs template.
What I want to achieve, is this:
build entry that is described by dependecies in array, so like xmg_mm_wrapper_bottom_banner
paste into built entry a HTML code built from .ejs template and styles, that are matching this entry
minimize and uglify what's possible
make it an exportable library, so the .js file will load also styles and template
repeat for every entry, besides vendors and commons
add all of built, minified and uglyfied scripts into single script library-like file, in which every built script will be loaded
make sure the vendors and then commons entries (in that order, also minified and uglified) will be put first, at the start of the single file library
The result should be single file library that after attaching on some 3rd party HTML file, will load own HTML, styles and logic.
Any ideas how to remake this config to get needed results?
Currently I have such webpack.config.js file:
And this config is used to build scripts, styles and templates (as HTML files), put separately in directories.
Then, scripts and styles are attached in HTML files built from .ejs template.
What I want to achieve, is this:
The result should be single file library that after attaching on some 3rd party HTML file, will load own HTML, styles and logic.
Any ideas how to remake this config to get needed results?
Environment
The text was updated successfully, but these errors were encountered: