Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
valenciaHQ opened this issue Jun 19, 2022 · 0 comments
Open

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

valenciaHQ opened this issue Jun 19, 2022 · 0 comments

Comments

@valenciaHQ
Copy link

valenciaHQ commented Jun 19, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant