I cannot include a file without an extension in addLayout function, otherwise the following error will occur when running the npm run prepack command:
ℹ Building my-module
ℹ Cleaning dist directory: ./dist
Could not map moduleDetection force
ERROR Template not found: /Users/seralekhin/Desktop/simple-module/src/runtime/layouts/auth
If I try to specify the js extension, the npm run prepack command also fails with an error:
ℹ Building my-module
ℹ Cleaning dist directory: ./dist
Could not map moduleDetection force
ERROR Template not found: /Users/seralekhin/Desktop/simple-module/src/runtime/layouts/auth.js
If I try to specify the tsx extension, the npm run prepack command succeeds, but then there is a problem in the project:
ERROR Cannot start nuxt: Template not found: /Users/seralekhin/Desktop/simple-module/dist/runtime/layouts/auth.tsx
Describe the bug
I cannot include a file without an extension in
addLayout
function, otherwise the following error will occur when running thenpm run prepack
command:If I try to specify the
js
extension, thenpm run prepack
command also fails with an error:If I try to specify the
tsx
extension, thenpm run prepack
command succeeds, but then there is a problem in the project:Reproduction
Open StackBlitz and go to
dist/module.mjs