-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
When I using this plugin with vue-cli5, vue-cli-service serve and vue-cli-service build will throw error:
Error: Child compilation failed:
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
* ./node_modules/.pnpm/html-webpack-plugin@5.5.3_webpack@5.88.2/node_modules/html-webpack-plugin/lib/loader.js
* ./node_modules/.pnpm/unplugin@1.5.0/node_modules/unplugin/dist/webpack/loaders/transform.js
You may need an additional loader to handle the result of these loaders.
> <!DOCTYPE html>
| <html lang="">
| <head>
I found html-webpack-plugin/lib/loader.js will check if there is any other loader, if exists it will return unmodified source, which cause error.
After some dig, I found add transformInclude hook and /\.html/ to plugin exclude config, unplugin will not create the loader which conflict with html-webpack-plugin and solve issue. But it also mean this plugin cant process html code. Maybe there is better way to fix this?
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested