Answer the question
In order to leave comments, you need to log in
Webpack and php, is it possible?
Hello! The question is: in my project, I use the html webpack plugin, which generates html pages in the dist folder. I needed to add a piece of php code to the page. How can I make it all work?
There is almost no information on the Internet about this, really no one works with php files in Webpack? I'm new to Webpack, right now I only use it to build, compile sass, babel js. Php is primarily needed in order to load repeating sections on pages, for forms, etc. Now I'm stuck and can't go any further.
I would be glad for any help. Thank you.
Answer the question
In order to leave comments, you need to log in
The html loader has an interpolation option. With PHP, you just need to include scripts and styles from dist via link and script manually
Can you explain in more detail what and how to do it right?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question