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

New Vike setting base and only apply it to production by default #1794

Open
brillout opened this issue Aug 9, 2024 · 0 comments
Open

New Vike setting base and only apply it to production by default #1794

brillout opened this issue Aug 9, 2024 · 0 comments
Labels
enhancement ✨ New feature or request

Comments

@brillout
Copy link
Member

brillout commented Aug 9, 2024

Description

Supersede Vite's base setting with a new Vike setting base.

// vike.config.js

export default {
  // Applies only in production
  base: {
    server: '/some/base-url/',
    assets: 'http://localhost:8080/cdn/'
  },

  base: '/some/base-url/', // sets base.server (or base.assets as well?)
  base: 'http://localhost:8080/cdn/', // sets base.assets (and base.server as well?)

  // Applies also in dev
  base: {
    dev: true,
    value: '/some/base-url/'
  },

  // Mixed
  base: {
    server: {
      dev: true,
      value: '/some/base-url/'
    },
    assets: {
      dev: false,
      value: 'http://localhost:8080/cdn/'
    }
  }
}

Blocker: Vike CLI / vike.config.js.

See also: #1790

@brillout brillout added the enhancement ✨ New feature or request label Aug 9, 2024
@brillout brillout reopened this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant