`server.origin` breaks HMR (tailwind JIT) - regression
See original GitHub issueDescribe the bug
Reported and fixed in: #5408
Setting the server.origin property in vite.config.ts breaks tailwind JIT hmr.
Fixing the vite version to 2.5.10 fixes the issue (server.origin didn’t exist so that makes sense).
Reproduction steps in the repro README: https://github.com/leevigraham/vite-hmr-issue-repro/blob/main/README.md
Reproduction
https://github.com/leevigraham/vite-hmr-issue-repro/blob/main/README.md
System Info
System:
OS: macOS 12.0.1
CPU: (10) arm64 Apple M1 Max
Memory: 2.43 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.1 - /opt/homebrew/bin/node
npm: 6.14.15 - /opt/homebrew/bin/npm
Browsers:
Chrome: 96.0.4664.55
Firefox: 93.0
Firefox Developer Edition: 95.0
Safari: 15.1
Safari Technology Preview: 15.4
Used Package Manager
npm
Logs
vite:config bundled config file loaded in 11.27ms +0ms
vite:config using resolved config: {
vite:config root: '/usr/local/var/www/_repro/vite-hmr-issue-repro/src',
vite:config server: { fs: { strict: undefined, allow: [Array] } },
vite:config build: {
vite:config target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config polyfillModulePreload: true,
vite:config outDir: 'dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
vite:config cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config sourcemap: false,
vite:config rollupOptions: {},
vite:config minify: 'esbuild',
vite:config terserOptions: {},
vite:config write: true,
vite:config emptyOutDir: null,
vite:config manifest: false,
vite:config lib: false,
vite:config ssr: false,
vite:config ssrManifest: false,
vite:config reportCompressedSize: true,
vite:config chunkSizeWarningLimit: 500,
vite:config watch: null,
vite:config commonjsOptions: { include: [Array], extensions: [Array] },
vite:config dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
vite:config },
vite:config configFile: '/usr/local/var/www/_repro/vite-hmr-issue-repro/vite.config.ts',
vite:config configFileDependencies: [ 'vite.config.ts' ],
vite:config inlineConfig: {
vite:config root: undefined,
vite:config base: undefined,
vite:config mode: undefined,
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config build: {}
vite:config },
vite:config base: '/',
vite:config resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
vite:config publicDir: '/usr/local/var/www/_repro/vite-hmr-issue-repro/src/public',
vite:config cacheDir: '/usr/local/var/www/_repro/vite-hmr-issue-repro/node_modules/.vite',
vite:config command: 'build',
vite:config mode: 'production',
vite:config isProduction: true,
vite:config plugins: [
vite:config 'alias',
vite:config 'vite:modulepreload-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:html-inline-script-proxy',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'vite:define',
vite:config 'vite:css-post',
vite:config 'vite:build-html',
vite:config 'commonjs',
vite:config 'vite:data-uri',
vite:config 'rollup-plugin-dynamic-import-variables',
vite:config 'vite:asset-import-meta-url',
vite:config 'vite:build-import-analysis',
vite:config 'vite:esbuild-transpile',
vite:config 'vite:reporter',
vite:config 'vite:load-fallback'
vite:config ],
vite:config env: { BASE_URL: '/', MODE: 'production', DEV: false, PROD: true },
vite:config assetsInclude: [Function: assetsInclude],
vite:config logger: {
vite:config hasWarned: false,
vite:config info: [Function: info],
vite:config warn: [Function: warn],
vite:config warnOnce: [Function: warnOnce],
vite:config error: [Function: error],
vite:config clearScreen: [Function: clearScreen],
vite:config hasErrorLogged: [Function: hasErrorLogged]
vite:config },
vite:config createResolver: [Function: createResolver],
vite:config optimizeDeps: {
vite:config esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite:config }
vite:config } +3ms
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Just-in-Time Mode - Tailwind CSS
Now when you start your development server or build runner, Tailwind will generate your styles on-demand instead of generating everything in advance.
Read more >Available CRAN Packages By Date of Publication
2022-12-19, plotdap, Easily Visualize Data from 'ERDDAP' Servers via the 'rerddap' Package. 2022-12-19, PLreg, Power Logit Regression for Modeling Bounded ...
Read more >TailwindCSS JIT Webpack HMR keeps recompiling with ...
I am trying to use TailwindCSS JIT feature in a custom Webpack project with Themekit and when running yarn start the webpack dev...
Read more >Integration for Vite - Windi CSS
Check out the speed comparison between Windi CSS and Tailwind CSS on Vite. ... On server start, vite-plugin-windicss will scan your source code...
Read more >Untitled
Capace jante oz, Popravka roletni nis, Hi spec brakes any good, R04 ach code, ... Data tier application sql server 2008, Jlpt test...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patak-js I could have sworn I checked the betas… seems to working fine. Let me update a real world project and get back to you.
I’ll pre-emptively close this as fixed, but feel free to let us know if this still happens @leevigraham