I am trying to convert the html file that would contain absolute paths in src. I found a similar problem in the webpack documentation. I try to use html-loader with extract-loader but gets an error.
html file -> simple.html
index js file :
import plik from './simple.html'
webpack.config.js -> [https://webpack.js.org/loaders/html-loader/#export-into-html-files][1]
Module version ->
"file-loader": "^6.2.0", "extract-loader": "^5.1.0", "html-loader": "^2.1.2", "webpack-cli": "^4.6.0", "webpack": "^5.28.0"
ERROR:
Module build failed (from ./node_modules/extract-loader/lib/extractLoader.js):
SyntaxError: unknown: Unexpected token (3:88)
1 | // Imports
2 | import ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___ from "../../node_modules/html-loader/dist/runtime/getUrl.js";
3 | var ___HTML_LOADER_IMPORT_0___ = new URL("./assets/img/xxxxyyyyzzzzz.png", import.meta.url);
Webpack can resolve **import.meta.url**
Someone has similar problem ??