question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The `base` property would be changed

See original GitHub issue

Describe the bug

The base property would be changed when it got base on configResolved hook.

Reproduction

export default defineConfig({
  base: 'http://localhost:8000/',
  plugins: [
    {
      name: 'test',

      configResolved(config) {
        console.log(config.base);
      },
    }
  ]
});

it prints '/' not 'http://localhost:8000/'

System Info

MacBook Pro (Retina, 15-inch, Mid 2015)
macOS Mojave 10.14.6
vite@2.4.3

Used Package Manager

npm

Logs

No response

Validations

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ElMassimocommented, Dec 2, 2022

Don’t want to increase the noise here, so I edited my previous comment.

In most cases, users that want to provide a full origin to base in development should use server.origin instead, which was added in:

0reactions
bluwycommented, Dec 10, 2022

We also discussed in the last meeting that this is intentional. Vite will resolve the base for it’s internal use. You can use server.origin for other cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change of Base Formula - Cuemath
The change of base formula is used to write a logarithm of a number with a given base as the ratio of two...
Read more >
Logarithm change of base rule intro (article) - Khan Academy
Learn how to rewrite any logarithm using logarithms with a different base. ... When using this property, you can choose to change the...
Read more >
Publication 551 (12/2018), Basis of Assets - IRS
Your original basis in property is adjusted (increased or decreased) by certain events. If you make improvements to the property, increase your ...
Read more >
c# - Notify in derived class when a property has changed in ...
You can declare the property as virtual in your base class, then override it in your derived class, calling your Foo method from...
Read more >
Change of base formula - Art of Problem Solving
The change of base formula is a formula for expressing a logarithm in one base in terms of logarithms in other bases. For...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found