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

keep config separate after build? #451

Open
KonradHoeffner opened this issue Dec 19, 2024 · 2 comments
Open

keep config separate after build? #451

KonradHoeffner opened this issue Dec 19, 2024 · 2 comments

Comments

@KonradHoeffner
Copy link
Collaborator

Right now it is hard to configure after the build step, because the config files get rolled up along with all other JavaScript code into a single file.
This is relevant for example when we only check out the already build code on our web server.
Is it possible and does it make sense to configure Vite that it keeps the config files separate?

@KonradHoeffner
Copy link
Collaborator Author

According to https://vite.dev/guide/build.html#customizing-the-build this may be achieved using Rollup options via build.rollupOptions:

vite.config.js

export default defineConfig({
  build: {
    rollupOptions: {
      // https://rollupjs.org/configuration-options/
    },
  },
})

@KonradHoeffner
Copy link
Collaborator Author

Implemented in branch rollupconf, but I'm not sure if I should merge it into master as it is still difficult to configure in this form even if slightly better than before.
On the flip side, we make the build more complicated.
@Yagnap: What do you think?

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

When branches are created from issues, their pull requests are automatically linked.

2 participants