diff --git a/.changeset/pretty-zebras-listen.md b/.changeset/pretty-zebras-listen.md new file mode 100644 index 0000000000..d7ee0faef4 --- /dev/null +++ b/.changeset/pretty-zebras-listen.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Fixed an issue where the `raw-loader` for loading HTML templates was not resolved from the context of the CLI package. diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index c61c117452..bd07c92f6f 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -209,7 +209,7 @@ export async function createConfig( minify: false, publicPath: '<%= publicPath %>', filename: 'index.html.tmpl', - template: `raw-loader!${paths.targetHtml}`, + template: `${require.resolve('raw-loader')}!${paths.targetHtml}`, }), ); }