-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
@webdiscus something is wrong with postprocess for js. I think /main.js/ is not here in postprocess moment
new PugPlugin({
postprocess: (content) => {
// ...content
content = content.replace(
/src="(\/.*?\.js)"/g, // doesn't find anything
`src="FROM(my_zip, '$1')"`,
);
return content;
}),
})
src="(\/.*?\.js)" matches src="/js/main.js"
The links of JS and CSS should be replaced in generated HTML.
Sometimes we need to paste HTML in another parser which reads assets (images, css, js) from zip file and sends to client. So "replacer" replaces to path to zip folder
Originally posted by @silveoj in #36 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels