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

Dynamic routes in public folder #3

Open
meigo opened this issue Apr 11, 2021 · 1 comment
Open

Dynamic routes in public folder #3

meigo opened this issue Apr 11, 2021 · 1 comment

Comments

@meigo
Copy link

meigo commented Apr 11, 2021

Is there any reason behind including dynamic route folders (as [slug] with index-[hash].js in template project) to public folder on production build, I think these are not used in production at all?

@meigo
Copy link
Author

meigo commented Apr 11, 2021

Removed source maps from production with

output: {
      ...
      sourcemap: watch && true,
}

But negating pattern seems not to work when square brackets are present in folder name with rollup-plugin-copy (or rollup-plugin-glob) and these folders are copied over to public folder. Actually making a duplicate in public root.

copy({
  targets: [
    ...
    { src: ['build/server/**/*', '!**/*.js', '!**/*.js.map'], dest: 'public' }
  ],
}),

As for template only css files were needed from build/server replaced copy target line with

{ src: 'build/server/**/*.css', dest: 'public' },

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