I'm building a module using tdsx
that implements rollup as a bundler
.
I have this structure:
dist
node_modules
src
templates
index.ts
Templates folder as some HTML files that I need and are being accessed as:
const filePath = path.join(__dirname, `/templates/${type}.html`);
and this is all being bundled as one root directory at dist
.
Does anyone know how to tell to rollup to bundle them as dist/templates/somehtmlfile.html
?
Since when I'm running test locally, they run fine since they get the file from /templates, but when I consume the module /templates does not exists.