You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuring html-loader to include partials adds the HTML to the index.html
Actual Behavior
ERROR in Error: Child compilation failed:
Module build failed (from ../node_modules/html-loader/dist/cjs.js):
ValidationError: Invalid options object. HTML Loader has been initialized using an options object that does not match the API sc hema.
- options.sources.list[1].type should be one of these:
"src" | "srcset"
- validate.js:104 validate
[www.artichokeruby.org]/[schema-utils]/dist/validate.js:104:11
- NormalModule.js:425 Object.getOptions
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:425:6
- index.js:17 Object.loader
[www.artichokeruby.org]/[html-loader]/dist/index.js:17:27
- ModuleBuildError: Module build failed (from ../node_modules/html-loader/dist/cjs.js):
- ValidationError: Invalid options object. HTML Loader has been initialized using an options object that does not match the API schema.
- - options.sources.list[1].type should be one of these:
- "src" | "srcset"
- validate.js:104 validate
[www.artichokeruby.org]/[schema-utils]/dist/validate.js:104:11
- NormalModule.js:425 Object.getOptions
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:425:6
- index.js:17 Object.loader
[www.artichokeruby.org]/[html-loader]/dist/index.js:17:27
- NormalModule.js:598 processResult
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:598:19
- NormalModule.js:692
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:692:5
- LoaderRunner.js:399
[www.artichokeruby.org]/[loader-runner]/lib/LoaderRunner.js:399:11
- LoaderRunner.js:251
[www.artichokeruby.org]/[loader-runner]/lib/LoaderRunner.js:251:18
- Module build failed (from ../node_modules/html-loader/dist/cjs.js):
- ValidationError: Invalid options object. HTML Loader has been initialized using an options object that does not match the API schema.
- - options.sources.list[1].type should be one of these:
- "src" | "srcset"
- validate.js:104 validate
[www.artichokeruby.org]/[schema-utils]/dist/validate.js:104:11
- NormalModule.js:425 Object.getOptions
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:425:6
- index.js:17 Object.loader
[www.artichokeruby.org]/[html-loader]/dist/index.js:17:27
- ModuleBuildError: Module build failed (from ../node_modules/html-loader/dist/cjs.js):
- ValidationError: Invalid options object. HTML Loader has been initialized using an options object that does not match the API schema.
- - options.sources.list[1].type should be one of these:
- "src" | "srcset"
- validate.js:104 validate
[www.artichokeruby.org]/[schema-utils]/dist/validate.js:104:11
- NormalModule.js:425 Object.getOptions
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:425:6
- index.js:17 Object.loader
[www.artichokeruby.org]/[html-loader]/dist/index.js:17:27
- NormalModule.js:598 processResult
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:598:19
- NormalModule.js:692
[www.artichokeruby.org]/[webpack]/lib/NormalModule.js:692:5
- LoaderRunner.js:399
[www.artichokeruby.org]/[loader-runner]/lib/LoaderRunner.js:399:11
- LoaderRunner.js:251
[www.artichokeruby.org]/[loader-runner]/lib/LoaderRunner.js:251:18
- child-compiler.js:159
[www.artichokeruby.org]/[html-webpack-plugin]/lib/child-compiler.js:159:18
- Compiler.js:513
[www.artichokeruby.org]/[webpack]/lib/Compiler.js:513:11
- Compiler.js:1065
[www.artichokeruby.org]/[webpack]/lib/Compiler.js:1065:17
- Hook.js:18 Hook.CALL_ASYNC_DELEGATE [as _callAsync]
[www.artichokeruby.org]/[tapable]/lib/Hook.js:18:14
- Compiler.js:1061
[www.artichokeruby.org]/[webpack]/lib/Compiler.js:1061:33
- Compilation.js:2413
[www.artichokeruby.org]/[webpack]/lib/Compilation.js:2413:11
- Hook.js:18 Hook.CALL_ASYNC_DELEGATE [as _callAsync]
[www.artichokeruby.org]/[tapable]/lib/Hook.js:18:14
- Compilation.js:2406
[www.artichokeruby.org]/[webpack]/lib/Compilation.js:2406:38
2 ERRORS in child compilations
webpack 5.21.2 compiled with 4 errors and 1 warning in 2157 ms
include is never supported and doesn't work for v1 or v2, but with the new release (v2), it is possible, I will improve this in the near future, let's close in favor #291
@alexander-akait I did manage to get this to work by requireing the partial with an html-loader!, but the partial doesn't get inlined into the source and instead shows up as [Module object] or something like that. Is there an example of requiring an html partial and inlining it into an html page?
Expected Behavior
Configuring
html-loader
to include partials adds the HTML to theindex.html
Actual Behavior
Code
How Do We Reproduce?
https://github.com/artichoke/www.artichokeruby.org/tree/da016d3d1fcef42ab0e4fb27085280ef87b0ecbb
$ npx webpack build
The text was updated successfully, but these errors were encountered: