Comments (2)
Have you tried buildEnd
? I often use it to teardown resources like this https://github.com/hi-ogawa/experiments/blob/a9c34a135b6c3ff62a3d763ff8aa8981216cc79a/tsr-rsc/src/integrations/plugin.ts#L67-L79
from vite.
@hi-ogawa Thank your for the hint. I tried that before and just some more testing. It looks like the hooks are executed like config
, configureServer
, buildEnd
(from the old run), buildStart
. I need a variable from the started server inside my config, so I need to start the server already inside the config
hook.
However, I solved it by finding the necessary number of empty ports before starting the new server process. This way the ports switch with every reload, but that's ok, as the user never uses these ports directly.
from vite.
Related Issues (20)
- HMR won't work on vue files if import other packages which are in the same monorepo HOT 1
- Vite dev doesn't serve index.html from subdirectories of publicDir HOT 1
- RollupError: [type] is not exported by [file] - failure for relative imports of types HOT 2
- The page will automatically refresh after installing the plugin.prompt:optimized dependencies changed. reloading
- How to Resolve Browser Cache Invalidation Issue in Vite-React Project Deployment?
- FluentMaterial fails to compile via vite HOT 1
- JavaScript API InlineConfig Loader/Callback/Provider HOT 2
- Segmentation fault when building sveltekit library with dependency using FFI HOT 1
- Dynamic imports doesn't work after i upgraded to Vite 5.3.1 HOT 9
- VITE_ASSET and `rollup-replace` plugin
- 5.3.0: Proxy should not rewrite the Origin header for non WS requests HOT 1
- Document not defined in worker import HOT 2
- what i cant understand is build.rollupOptions.cache means like production env build cache? but when i open that ,i cant perceive anything changed
- 字体图标无法正确加载 HOT 1
- __vite__mapDeps optimization breaks configuration depending on Vite bundling HOT 1
- Suppress `dynamic import cannot be analyzed by Vite` warning for dynamic imports with /* webpackIgnore: true */ HOT 1
- Error `Unexpected token '{'` after upgrade from [email protected] HOT 2
- Typings incorrect for CommonServerOptions `https`, should be `| boolean` HOT 1
- Support `resolve.alias` per environment in Environments API HOT 6
- Invalid relative path in index.html when building with base option empty in Windows HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite.