module-builder
module-builder copied to clipboard
Unable to use `addLayout` function when writing Vue components in `TSX` files
Describe the bug
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
Reproduction
Open StackBlitz and go to dist/module.mjs