I have been working on a Webpack project. For anyone unfamiliar with Webpack, it is a bundler that takes all your files and spits out a final product.
I wanted to inject one HTML file into another, like an import or require(). I have been using this GitHub template to help me piece together my project. https://github.com/dharmikumbhani/webpack-multipage-starter
In webpack-multipage-starter/src/page-index/index.html on line 10 and 11 there is the following:
<!-- intercepted by a resourceQuery in the webpack config -->
<%= require('../partials/nav.html?raw') %>
This line gets intercepted by a resourceQuery (in the webpack.common.js configuration) and the HTML file is injected into this position.
What is the meaning of this HTML tag?
<%= =>
All I know is that it holds a Java-Script expression which gets evaluated during the Webpack build process.