<L7.2> When use page fragment, js files folder can't be load by html, 404

Shawn Lee, modified 5 Years ago. New Member Posts: 9 Join Date: 12/16/19 Recent Posts
Hi, all. When I use liferay-fragments-cli tool generate a page fragment struture, copy a little html page in structure followed by the tool instruction, and finally import it by CMD " npm run import", this new fragment component can be installed in Liferay 7.2 smoothly. But one thing let me crazy. I used a third party JS library in this little html page, which have a lot of js files with complex folder structure. When I visit this liferay fragment page through web browser, a lot of *.js file in JS library not found 404 error occure in web browser console(F12 key). According tool's instruction, I give a real path configuration to fragment.json file, but I have no idea how to add all JS library folder path to fragment.json file because official tool instruction not mention about that. On the other hand, the fragment index.html file I copied use just like "src="libs/modules/show.min.js"" discription to allocate all JS linbrary files in the html page. From console, the error show  "http://127.0.0.1:8080/en/web/guest/show.min.js" 404 not found. So I 'm not sure how to load whole js library files in page fragment.
Anybody can give me a tip?  thanks a lot!