tsdx icon indicating copy to clipboard operation
tsdx copied to clipboard

How to set subdirectory in dist with rollup-plugin-static-files

Open valenciaHQ opened this issue 2 years ago • 0 comments

Hi! 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 exist.

valenciaHQ avatar Jun 19 '22 00:06 valenciaHQ