2.7.9 (2021-12-28)
2.7.8 (2021-12-28)
- html: show error overlay when parsing invalid file (#6184) (1f945f6)
- seperate source and dep for dymamic import after build (#6251) (49da986)
- ssr: capture scope declaration correctly (#6281) (60ce7f9)
- upgrade to launch-editor with picocolors (#6209) (394539c)
2.7.7 (2021-12-26)
2.7.6 (2021-12-22)
2.7.5 (2021-12-21)
- asset: import assets from encodeURI(#6195) (#6199) (4114f84)
- hmr full-reload encodeURI path (#6212) (46b862a)
- remove top-level imports in importMeta.d.ts, fixes augmentation (#6214) (6b8d94d), closes #6194 #6211 #6206 #6205
- ssr: handle object destructure alias, close #6222 (#6224) (1d97ec3)
2.7.4 (2021-12-20)
- duplicate variable declaration caused by css modules (#5873) (8e16a78)
- improve error message for HTML compilation error (fix #5769) (#5777) (79d1397)
- ssr:
ssrTransform
function argument destructure (#6171) (2762a0e)
2.7.3 (2021-12-16)
- do not overwrite rollupOptions.input in dev (#6025) (6cdf13a)
- Improve post-build asset update check (#6113) (611fa03)
- improve warning message for malformed packages (#6086) (717cb08)
- pending reload never timeout (#6120) (e002f4f)
- respect new port when change the config file (#6075) (3ceffcc)
- ssr: robust regexp to check cjs content (#6053) (0373441)
- terminate WebSocket connections before closing WebSocket server (#6115) (b9871bb)
2.7.2 (2021-12-13)
- html: empty script (#6057) (1487223)
- lexGlobPattern: edge case of glob import (#6022) (d4c5cff)
- ws types (#6083) (1ded1a8)
2.7.1 (2021-12-07)
2.7.0 (2021-12-07)
- 🎉 Revamped SSR dependency handling
- 🧩 API consolidation
- 🛑 server.fs.strict by default
server.fs.strict
istrue
by default (#5341) See server filesystem restriction docs for more details.- Plugin hooks
ssr
param to object inresolveId
,load
, andtransform
(#5253) Previous to this release, thessr
param was passed as aboolean
in the last parameter of each hook. The new interface for these hooks is now:In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7.export interface Plugin extends RollupPlugin { // ... other hooks resolveId?(this: PluginContext, source: string, importer: string | undefined, options: { custom?: CustomPluginOptions; ssr?: boolean; }): Promise<ResolveIdResult> | ResolveIdResult; load?(this: PluginContext, id: string, options?: { ssr?: boolean; }): Promise<LoadResult> | LoadResult; transform?(this: TransformPluginContext, code: string, id: string, options?: { ssr?: boolean; }): Promise<TransformResult> | TransformResult; }
server.pluginContainer
options object forresolveId
,load
, andtransform
(#5294)- Normalize scripts and commands naming (#5207)
Adds a new
vite dev
command alias forvite serve
, preparing for the new release of create-vite where package scripts are renamed todev
,build
, andpreview
. - Align experimental
preview
api (#5407) This API was first introduced in 2.6 and it is still in flux. - resolve
rollupOptions.input
paths (#5601)
2.7.0-beta.11 (2021-12-06)
2.7.0-beta.10 (2021-12-02)
- invalidate inlined proxy scripts on change (#5891) (5b8c58b)
- read the correct package.json in ssrExternal (#5927) (7edabb4), closes #5890
- resolve: dont overwrite
isRequire
frombaseOptions
(#5872) (2b91e5a) - scan: handle local scripts with lang=ts (#5850) (7ed8702)
- SSR import in dev can't resolve default import (fix #5706) (#5923) (21d79d7)
- ssr: skip dedupe require if noExternal true (#5928) (f6aa7fe)
2.7.0-beta.9 (2021-11-27)
isBuiltin
using patched nativebuiltinModules
(#5827) (4a05a6e)- always bundle config file, fix config hmr (#5779) (19d2b6a)
- build pluginContext types error (#5846) (c278439)
- circular dependency hmr causes refresh crash (#4589) (00d8c9b)
- replace asset references in CSS returned to JS (#5729) (880026e)
- resolve addons using nodeResolve() (#5809) (d288772)
- throw full error causing preprocessor to not load (#5816) (f6fcd21)
- unicode path html entry point (#5821) (#5823) (2048195)
- unminified build breaks __vitePreload (#5785) (757a74a)
2.7.0-beta.8 (2021-11-19)
- hmr: prevent SSR from setting
isSelfAccepting
to false (#5377) (37e5617) - move package.json cache into ResolvedConfig (#5388) (650b56e)
- scoped variable with array destructuring & nested arguments (#5730) (b86a2f3)
- transformCjsImport: make dev and build get the same result (#5745) (9d3e4e6)
2.7.0-beta.7 (2021-11-17)
- build: keep IIFE name after minifying (fix #5490) (#5715) (1544211)
- scan: correctly resolve virtual modules (#5711) (01f9b16)
- ssr: skip dedupe require in esm (#5714) (9666446)
2.7.0-beta.6 (2021-11-16)
- dev: Fix infinite recursion on query imports (#5671) (#5674) (bce4e56)
- ssr: avoid resolving ESM for CJS dependencies (#5693) (b937ea4)
2.7.0-beta.5 (2021-11-13)
- correctly resolve virtual modules during import scan (#5659) (40d503c)
- resolve: check nested directories for package.json (#5665) (022db52)
- ssr: prefer CJS but still allow ESM entries (#5662) (72d8925)
- tolerate undefined parent in
hookNodeResolve
callback (#5664) (d788682)
2.7.0-beta.4 (2021-11-12)
- build: resolve
rollupOptions.input
paths (#5601) (5b6b016) - check exactly in proxyESM (#5512) (a17da55)
- handle local and module scripts separately (#5464) (0713446)
- logger: no sameCount if clearScreen is false (#5648) (afd6b6d)
- server: watch correct env files (#5520) (03b77bd)
- sourcemap: tolerate virtual modules in
sources
array (#5587) (cfd2c5e) - ssr: use
tryNodeResolve
instead ofresolveFrom
(#3951) (87c0050) - use micromatch for consistent glob matching (#5610) (9d50df8)
- vitepress/theme in ssrExternals (#5651) (1f91cdb)
2.7.0-beta.3 (2021-11-08)
2.7.0-beta.2 (2021-11-08)
- commonjs: expose ignoreTryCatch config option (#5555) (d383c2a)
- esbuild: respect esbuild config on build (#5538) (ff05fe9)
- hmr: revert early break from handleHotUpdate loop (#5536) (4abade6)
- replace server.origin in css plugin (fix #5408) (#5571) (bd8b66d)
- server: use
options
argument in caching oftransformRequest
calls (#5391) (27b7f90) - Windows path error on script proxying (#5556) (f8dc1ee)
- importing ts files using their corresponding js extesions (#5510) (7977e92)
- preview config (#5514) (ff755eb)
2.7.0-beta.1 (2021-11-01)
- ssr: dont transform process.env. in ssr (#5404) (1140981)
- Vite module graph race condition (#5470) (70fd32c)
2.7.0-beta.0 (2021-10-28)
- add
import
support tossrModuleLoader
(#5197) (baba1f9) - consider # as a valid dir symbol (fix #4701) (#4703) (52689c8)
- do not overwrite pendingReload promise (fix #5448) (#5452) (cc9c2da)
- exclude dependency of optimized dependency (fix: 5410) (#5411) (ebd4027)
- missing tags inject fallback (#5339) (3c44ac8)
2.6.13 (2021-10-27)
2.6.12 (2021-10-26)
2.6.11 (2021-10-25)
- build: let top-level
this
refer toglobalThis
(#5312) (7e25429) - bundle ws types (#5340) (bc4a96c)
- client: fix typo in overlay config hint (#5343) (96591bf)
- consider deep imports in isBuiltIn (#5248) (269a1b6)
- ensure server.host is passed in preview-mode (fix #5387) (#5389) (61b4b39)
- load-fallback catch (#5412) (e73281c)
- restrict static middleware fs access (#5361) (1f4723b)
- ssr: ssrTransfrom with function declaration in scope, fix #4306 (#5376) (5306632)
2.6.10 (2021-10-18)
2.6.9 (2021-10-18)
2.6.8 (2021-10-18)
- avoid scan failures in .svelte and .astro files (#5193) (386ca79)
- deps: bump postcss-load-config to 3.1.0 (#5277) (b7e8a5c)
- html: tags prepend doctype regex (#5315) (256b2bb)
- improve HTML script proxying (#5279) (1d6e7bb)
- regEx for tag, fix #5285 (#5311) (3ac08cc)
- ssr: make import.meta.url be the filesystem URL (#5268) (7674cf2)
2.6.7 (2021-10-11)
2.6.6 (2021-10-11)
- avoid unnecessary pre-bundling warning (b586098)
- server: skipped for ended response (#5230) (7255fd5)
2.6.5 (2021-10-07)
2.6.4 (2021-10-07)
- better error message for parse failures (#5192) (8fe8df3)
- use Function instead of eval to dynamically import config files (#5213) (10694dd)
2.6.3 (2021-10-05)
- dev: read property of undefined (#5177) (70e882f)
- type: update ExportsData type (b582581)
- upgrade to @rollup/plugin-commonjs 21.x (#5173) (c5bfc5e)
2.6.2 (2021-09-30)
- cli: log correct hostname (#5156) (6f977a5)
- properly handle postfix for getRealPath (#5149) (7d257c3)
2.6.1 (2021-09-29)
2.6.0 (2021-09-29)
2.6.0-beta.4 (2021-09-28)
- don't overwrite default options unless given new value (#5111) (4d72b40)
- use global location for import.meta.url rewrite (fix #5087) (#5113) (0b54853)
2.6.0-beta.3 (2021-09-27)
- Allow custom asset URL origin in development (#5104) (e4ef6dd)
- avoid module preload polyfill for zero js html (#4999) (ac55755)
- injected tags indentation (#5000) (4b84c0d)
- lib-mode: do not minify lib mode es output (06d86e4), closes /github.com/vuejs/vue-next/issues/2860#issuecomment-926882793
- normalize away
base
in imported URLs (#5065) (9164da0) - server.address before listen, chdir in test, basic cli test (#5059) (fb37a63)
- should load
--config foo.mjs
as an ES module (#5091) (5d2c50a) - types: missing return type on
logError
(#5067) (3c9f1a1) - use the same
target
for optimized dependencies and source files (#5095) (8456a6f), closes #4897
- expose
preview
method (#5014) (9885656) - expose
searchForWorkspaceRoot
util (#4958) (d0f7bf1) - server.open supports absolute path (#5068) (2d6f682)
2.6.0-beta.2 (2021-09-23)
2.6.0-beta.1 (2021-09-23)
- bump js parser ecmaVersion option to 'latest', fix #5013 (#5021) (3541ebc)
- dedupe import analysis public name (#5032) (545b1f1)
- exclude ?commonjs-external when building in JSON plugin (#4867) (fe25567)
- exclude missing dependencies from optimization during SSR (#5017) (2204afa)
- move peerDeps from #2042 to the right package.json (3161d75)
- sourcemaps windows drive letter inconsistency, fix 4964 (#4985) (723cd63)
- ssr: handle default arguments properly in
ssrTransform
(#5040) (6a60080) - use lax range for peer deps (35bd963)
- default build.minify to esbuild (#5041) (e4892be)
- pre transform direct imports before requests hit the server (#5037) (57b9a37)
- support .astro files (#5038) (79ff0ec)
2.6.0-beta.0 (2021-09-20)
- avoid wrong warning of explicit public paths (#4927) (9e06b81)
- css: revert return sourcemap in vite:css transform (#4880) (#4951) (72cb33e)
- deps: update all non-major dependencies (#4545) (a44fd5d)
- do not include css string in bundle if not needed (3e3c203)
- docs for ssr manifest plugin and dedupe name (#4974) (1bd6d56)
- force overlay LTR (#4943) (f8d8b73)
- handle sourcemap: false in transformWithEsbuild (864d41d)
- normalize internal plugin names (#4976) (37f0b2f)
- ssr: add normalizePath to require.resolve, fix #2393 (#4980) (417208c)
- update *.wasm type (fix #4835) (#4881) (5e1b8d4)
- use pkgId to get relative path (#4957) (#4961) (b9e837a)
- websocket proxies not the same as http (#4893) (9260848)
- add resolve.preserveSymlinks option (#4708) (b61b044)
- async script module support, close #3163 (#4864) (3984569)
- export transformWithEsbuild (#4882) (c8c0f74)
- html: Inline entry chunk when possible (#4555) (e687d98)
- report compressed size using gzip instead of brotli due to drastic (deb84c0)
2.5.7 (2021-09-13)
- compute getPkgName only when used (#4729) (ce29273)
- css: return sourcemap in vite:css transform (#4880) (015290a)
- esbuildDepPlugin: externalize built-in module during SSR (#4904) (5cc4587)
- the base is duplicated in
importAnalysisBuild.ts
(#4740) (7e929ae)
- allow
apply
condition to be a function (#4857) (f19282f) - ssr: exports
dynamicDeps
for ssrTransform, close #4898 (#4909) (9e51a76)
2.5.6 (2021-09-08)
- importAnalysis: properly inherit dependency version query for self imports (c7c39b1)
- use debugger for package resolution warnings (#4873) (38de2c9)
2.5.5 (2021-09-08)
- hmr: should break on first matched plugin that performs custom hmr handling (b3b8c61)
2.5.4 (2021-09-07)
- check for Blob before creating worker URL, close #4462 (#4674) (311026f)
- css: loadPreprocessor tolerate
require.resolve.paths
not exists (#4853) (c588b8f) - handle error in numberToPos and formatError (#4782) (c87763c)
- overlay: handle missing customElements (#4856) (e5b472d)
- sometimes THIS_IS_UNDEFINED warnings were still shown (#4844) (8d956f6)
2.5.3 (2021-09-01)
- apply SSR externalization heuristic to devDependencies (#4699) (0f1d6be)
- resolve: normalize optimized resolved path (#4813) (fa6475f)
2.5.2 (2021-08-31)
- decode url for middleware (#4728) (824d042)
- don't transform new URL(url, import.meta.url) in comments (#4732) (bf0b631)
- prevent pre-bundling @vite/client and @vite/env (#4716) (e8c1906)
- special handling for ssr.noExternal in mergeConfig (#4766) (689a2c8)
- ssr: resolve .cjs file extensions (#4772) (96712ad)
- unexpected file request with custom publicDir, fix #4629 (#4631) (7be6c0c)
- add
.pdf
to list of known asset types (#4752) (d891641) - allow custom vite env prefix (#4676) (dfdb9cc)
- allow use of clientPort without middlewareMode (#4332) (da0abc5)
- optimizer: nested optimization (#4634) (f61ec46)
2.5.1 (2021-08-24)
- DEFINES is not defined is env (#4694) (ff50c22)
Matcher
for chokidar WatchOptions#ignored (#4616) (89e7a41)- enable failing dependencies to be optimised by pre-processing them with esbuild (#4275) (ea98a1a)
- css: minify css will transform rgba to #rrggbbaa (#4658) (632a50a)
- CSS dependencies are tracked incorrectly when base is set (#4592) (633c03a)
- css: dynamic import css abnormal after build (#3333) (b572f57)
- scan: do not match 'export default' in comments (#4602) (8b85f5f)
- vite: unexptected overwriting for default export fix(#4553) (#4596) (c7929ad)
- surface exception when failing to resolve package entry (#4426) (f75e508)
- Add
ssr.noExternal = true
option (#4490) (963387a) - make redirect easier when visit a non-based page (#4618) (b97afa7)
2.5.0 (2021-08-16)
2.5.0-beta.3 (2021-08-14)
- add ?inline css query typings (#4570) (c8a17a2)
- skip optimizer run on non-JS script tags (#4565) (270bd3a)
- support dangling comma and throw on circular dependency in tsconfig (#4590) (f318416)
2.5.0-beta.2 (2021-08-09)
- client: vite-error-overlay customElement is registered twice (#4475) (28a9612)
- add missing assets to
packages/vite/client.d.ts
(#4516) (420d82d) - avoid crash when a file imported in SCSS does not exist (#4505) (a03e944)
- add asset name (#3028) (#3050) (a055938)
- import
.webmanifest
assets as URL (#4515) (8c5ac3f) - log a warning if dependency pre-bundling cannot be run (#4546) (120f3b9)
2.5.0-beta.1 (2021-08-04)
- change the preview default mode from
development
toproduction
(#4483) (77933ba) - close vite dev server before creating new one (#4374) (9e4572e)
- register files added by addWatchFile() as current module's dependency (db4ba56), closes #3216
2.5.0-beta.0 (2021-08-03)
- mixed match result of importMetaUrl (#4482) (86f673a)
- build: respect rollup output.assetFileNames, fix #2944 (#4352) (cbd0458)
- deps: update all non-major dependencies (#4468) (cd54a22)
- html: cover more cases in bodyPrependInjectRE (#4474) (40c51e1)
- server: keep port when modifying the config file (#4460) (056b17e)
- config port timing, fix #4094 (#4104) (6b98fdd)
- overwrite configEnv.mode if the user explicitly set mode option (fix #4441) (#4437) (7d340a6)
- update dependency @rollup/plugin-commonjs to v20, fix #2623 (#4469) (f9e5d63)
- scan: improve import regex and allow multiline comments (#4088) (76dbef6)
- @vite/client http request is 404 not found (#4187) (21ecdac)
- import sass file even if not listed in package.json (#3627) (a5b2b4f)
- the return value of resolve by adding a namespace when processing a '@' in filter (#3534) (d4e979f)
- build: fix define plugin spread operations (#4397) (bd7c148)
- preserve base in HMR for CSS referenced in link tags (#4407) (a06b26b)
- ssr: tolerate circular imports (#3950) (69f91a1)
- implement custom logger (#2521) (59841f0)
- css: support css module compose/from path resolution (#4378) (690b35e)
- minify css with esbuild, deprecate build.cleanCssOptions (#4371) (4454688)
- modulepreload polyfill (#4058) (cb75dbd)
- respect tsconfig options that affects compilation results (#4279) (2986f6e)
2.4.4 (2021-07-27)
- deps: update all non-major dependencies (#4387) (2f900ba)
- --https get ignored in preview (#4318) (a870584)
- don't interact with res if refresh has happened (#4370) (c90b7d9)
- fix pre-bundling executes multiple times (#3640) (41a00df)
- handle imports from dot directories (#3739) (f4f0100)
- ignore ENOENT in
injectSourcesContent
(#2904) (0693d03) - provide build load fallback for arbitrary request with queries (f097aa1)
- css: cachedPostcssConfig reused for multiple builds (#3906) (3a97644)
- support ?inline css query to avoid css insertion (e1de8a8)
2.4.3 (2021-07-20)
- call createFileOnlyEntry() only for CSS deps, fix #4150 (#4267) (89e3160)
- dev: only rewrite SSR stacktrace when possible (#4248) (887c247)
- util: copyDir may cause an infinite loop (#4310) (da64197)
- correctly ignore optional deps when bundling vite deps (#4223) (b5ab77d), closes #3977 #3850
- do not end process in middleware mode, fix #4196 (#4232) (1c994f8)
- improve indent of built html file (#4227) (0316f14)
- nested dependencies from sub node_modules, fix #3254 (#4091) (b465d3e)
vite preview
port is used automatically+1
(#4219) (179a057)- enable usage of function as library fileName, close #3585 (#3625) (772b2f7)
- extract
config.base
inimportAnalysisBuild.ts
(#4096) (ab59598) - library mode does not include preload (#4097) (decc7d8)
2.4.2 (2021-07-12)
- VITE_PRELOAD replacement error (#4163) (d377aae), closes #3051
- shutdown process after closing server (#4082) (eac779c)
- build: resolve license files correctly (#4149) (bf32b41)
- utils: add dot-all flag to match all characters, fix #3761 (#3780) (b9cdfbe)
2.4.1 (2021-07-06)
- hmr: html registered as a PostCSS dependency, fix #3716 (#4127) (09c6c94)
- specify full filepath to importMeta.d.ts, fix #4125 (#4138) (3bc1d78)
2.4.0 (2021-07-05)
2.4.0-beta.3 (2021-07-02)
- ssr: Transform named default exports without altering scope (#4053) (5211aaf)
- add
type: "module"
hint to cache directory (#4063) (58a29b2) - allow preprocessor to be installed outside of the root directory (#3988) (a0a80f8)
- Avoid importing in source that __vitePreload has declared (close #4016) (#4041) (bd34203)
- ensure that esbuild uses the same working directory as Vite (#4001) (19abafe)
- fix esbuild break when importRe matches multiline import (#4054) (eb2e41b)
- skip redirect and error fallback on middleware mode (#4057) (d156a9f)
- the current main branch code build the vite project error (#4059) (4adc970)
- use
.mjs
extension for injected client modules (#4061) (cca92c4) - use path type import, fix #4028 (#4031) (e092e89)
2.4.0-beta.2 (2021-06-29)
- revert resolve nested dependencies #3753 (#4019) (b6f4293), closes #4005
- commonjs:
ignoreDynamicRequires
should default tofalse
(#4015) (c08069c), closes /github.com/vitejs/vite/pull/3353#issuecomment-851520683 #3426 #3997 - css: skip comma when matching css url (#4004) (7d0bc26)
2.4.0-beta.1 (2021-06-29)
- hmr: entry mod's importers contains css mod invalidate hmr (#3929) (d97b33a)
- types: correct import of types (#4003) (4954636)
2.4.0-beta.0 (2021-06-27)
- server:
server.fsServe
renamed toserver.fs
(#3965) - server:
server.fs.root
deprecated in favor ofserver.fs.allow
(#3968)
We have improved the file serving boundaries detection with (#3784). While it's still experimental and disabled by default, you can opt-in it by
// vite.config.js
export default {
server: {
fs: {
strict: true
}
}
}
It should smartly serve the files related to your project (directly imported, linked deps, etc.) while denying the rest. If you find any false-negative, please open an issue with reproduction to report.
- build: bundle non-inlined workers with rollup (#2494) (18a2208)
- resolve nested dependencies (#3254) (#3753) (8467f64)
- css: file or contents missing error in build watch (#3742) (#3747) (26b1b99)
- deps: update all non-major dependencies (#3878) (a66a805)
- scan: 'for await' support in script setup for dev server (#3889) (dd46cd1)
- scan: avoid breaking html comment regex inside script of scanned html-like files (bb095db)
- ssr: fix binding overwrite at nested function, fix #3856 (#3869) (85f51c1)
- ssr: normalize manifest filenames (#3706) (aa8ca3f), closes #3303
- ssr: not flatten export * as (fix #3934) (#3954) (7381d27)
- ssr: not importing browser exports, fix #3772 (#3933) (f623ba3)
- do not end server process in CI (#3659) (5999444)
- missing styles with build watch (#3742) (#3887) (c9a6efe)
- multiple css url separation (fix #3922) (#3926) (2d01e62)
- only downgrade target to es2019 when actually using terser (bd8723e)
- add client events to import.meta.hot.on (#3638) (de1ddd4)
- fs-serve import graph awareness (#3784) (c45a02f)
- generate inline sourcemaps for bundled vite.config.js files (#3949) (cff2fcd)
- support for regex for ssr.noExternal (#3819) (330c94c)
- support new URL(url, import.meta.url) usage (4cbb40d)
2.3.8 (2021-06-19)
- css: filter out function name suffixes with url (#3752) (9aa255a)
- deps: update all non-major dependencies (#3791) (74d409e)
- hmr: always invalidate all affected modules (e048114)
- hmr: avoid css propagation infinite loop (7362e6e)
- hmr: avoid duplicated modules for css dependency (385ced9)
- hmr/css: check CSS importers for hmr boundaries - fix Tailwind 2.2 compat (6eaec3a)
- hmr/css: fix infinite recursion on hmr (#3865) (0d5726f)
- ?import with trailing = added by some servers (#3805) (460d1cd)
- don't replace
process.env
ifprocess
not global variable (#3703) (5aeadb7) - upgrade esbuild for esm compatibility (#3718) (dbb5eab), closes #3399 #3413
2.3.7 (2021-06-08)
- Include src files in vite npm bundle (for sourcemaps) (#3656) (294d8b4)
- show error message above the stack when HMR overlay is disabled (#3677) (6b4c355)
- tolerant fs error in formatError (#3665) (5146cc5)
- update
sirv
to decode url in preview (#3680) (0430127)
2.3.6 (2021-06-02)
- revert avoid css leaking into emitted javascript (#3402) (#3630) (91eb2a6)
- types: add '*?.sharedworker' typing (#3618) (690ff99)
2.3.5 (2021-06-01)
- cannot recognize JS url correctly(#3568) (#3572) (ab08652)
- tests: fix tests run fail in the Chinese directory (#3586) (3cab2c2)
- update esbuild to 0.12 (#3570) (421c530)
- config: add
envDir
option (#3407) (472ba5d) - plugins/worker: support SharedWorker (resolve #2093) (#2505) (d78191c)
- ssr: include non-CSS assets in the manifest (#3556) (adc7170)
- added clientPort to HmrOptions (#3578) (7db69a3)
2.3.4 (2021-05-25)
- allow passing an array as sass / scss importer (#3529) (e344cdd)
- avoid css leaking into emitted javascript (#3402) (65d333d)
- clean manifest plugin state at build start (#3530) (c9da635)
- data-uri plugin cache reset at buildStart (#3537) (9d97b6d)
- do not cache module while the file contains import.meta.glob (#3005) (e7b8f41)
- ensure new assets cache at build start, fix #3271 (#3512) (9484c0f)
- ensure new CSS modules cache at build start (#3516) (07ad2b4)
- preview: #3487 preview should serve latest content by default (#3488) (9a4183d)
- preview: allow to disable HTTPS (#3514) (cf1632e)
- preview: support custom hostname (#3506) (5979d0e)
- types: add .module.pcss typings, fix #3518 (#3519) (3475351)
- handle HMR for files with more than one glob import (#3497) (05bd96e)
- inline webworker safari support (#3468) (2671546)
- invalidate import globs upon new/removed files (fix #3499) (#3500) (b31604e)
- track deps for css @import in build watch mode, fix #3387 (#3478) (13bda33)
2.3.3 (2021-05-17)
- ignore ids that start with \0 in plugin asset, fix #3424 (#3436) (f6cfe30)
- restore dynamic-import-polyfill (#3434) (4112c5d)
- sass importer can't be undefined (fix: #3390) (#3395) (30ff5a2)
- skip fs fallback for out of root urls, fix #3364 (#3431) (19dae99)
- warn about dynamic import polyfill only during build (#3446) (5fe0550)
2.3.2 (2021-05-12)
- css: fix sass importer error (#3368) (3f04abf)
- server: hostname defaults to localhost, fix #3355 (#3383) (8b5a6a8)
2.3.1 (2021-05-12)
We introduced a security fix in v2.3.0 to restrict file access outside of the workspace root. We received reports of issues with symlinks and monorepo setups, so we are marking this feature as experimental and disabling it by default to avoid disruption in the ecosystem.
A new experimental option server.fsServe.strict
was added defaulting to false
. This disables the restrictions by default. The fsServe
restrictions are going to be enabled by default in a future version, once the issues are been resolved and the logic becomes more robust. You can opt-in to this security change using (experimental)
// vite.config.js
export default {
server: {
fsServe: {
strict: true
}
}
}
- bump @rollup/plugin-commonjs to v19, fix #3312 (#3353) (c6ef6d0)
- disable fsServe restrictions by default (#3377) (5433a65)
- normalize url in
ensureServingAccess
(#3350) (deb465b) - use the closest package.json as root when workspace not found fo… (#3374) (42b35ac)
2.3.0 (2021-05-11)
- Browser default targets changed (PR #2976)
- Default browser support range has changed. The minimum requirement is now native dynamic import support. Most notably, this means support for legacy Microsoft Edge (16-18) has been dropped.
vite/dynamic-import-polyfill
removed and no longer required in custom entries
-
Limited impact: The affected target browsers are ones that natively support ES6 modules (92.83% of global usage) but do not support native dynamic imports (92.34% of global usage). So this is a small range affecting only 0.49% of global usage.
This number should continue to decrease in the future as most modern browsers are evergreen. You are also not affected if you are already targeting legacy browsers using
@vitejs/plugin-legacy
. -
Easy migration: if you do intend to support browsers that fall into this category, you can use dynamic-import-polyfill.
To make the polyfill work, you will also need to use a plugin with
renderDynamicImport
to change the import calls to__import__
. You can follow the installation guide in this example. -
Required for bug fixes: This change is required for upgrading esbuild from v0.9 to v0.11, which includes a lot of bug fixes and improvements. And it also allows us to remove the complexity of the dynamic import polyfill.
- Dev server only listens to localhost by default now (PR #2977)
- Pass
--host 0.0.0.0
to change back to the previous behavior.
- Pass
- Dev server only serves files under workspace root by defualt (PR #2850, #3321)
- Accessing files outside of workspace root will result in a 403 response.
- Vite will try to search up for workspace root defined in
package.json
orpnpm-workspace.yaml
- To set the workspace root explicitly, see configurations
- dev: rewrite importee path at html files at spa fallback (#3239) (13d41d8)
- hmr: respect server https options when running as middleware (#1992) (24178b0)
- serve: prevent serving unrestricted files (#3321) (7231b5a)
- only provide npm package names to resolveSSRExternal (#2717) (6dde32a)
- prevent serving unrestricted files (fix #2820) (#2850) (792a6e1)
- type error by #3151 (#3292) (fd4146b)
- upgrade to esbuild@0.11.19 (#3282) (b0dd69d)
- warning for vite/dynamic-import-polyfill (#3328) (8b80512)
- ci: fix ci lint step (#2988) (4e8ffd8)
- resolve: normalize node_modules and bare imports, fix #2503 (#2848) (0c97412)
- server: Listen only to 127.0.0.1 by default (#2977) (1e604d5)
- ssr: resolve dynamic import vars modules (#3177) (b1e7395)
- add optimizeDeps.esbuildOptions (#2991) (77a882a)
- set publicDir to false to disable copied static assets to build dist dir (#3152) (f4ab90a)
- webworker ssr target (#3151) (1c59ef1)
2.2.4 (2021-05-03)
- dev: strip utf-8 bom (#3162) (#3171) (19a2869)
- call
buildStart
hook in middleware mode (#3080) (c374a54) - scan: improve script regular matching (fixes #2942) (#2961) (1e785d1)
- dependencies are analyzed multiple times (#3154) (28a67ad)
- emptyOutDir: never remove .git (#3043) (82dc588)
2.2.3 (2021-04-25)
- revert #2541, fix #3084 #3101 (#3144) (f4e7918)
- build: vendor chunk strategy uses static imports, fix #2672 (#2934) (949b818)
- add .svelte to list of known js src files (#3128) (0f09eaf)
- await bundle close in worker plugin (#2997) (0e7125a)
- dymamic import polyfill path when base is a URL (#3132) (02ba4ba)
- handle null/empty sources in source maps (#3074) (3e9f128)
- support postcss .pcss extension (#3130) (6d602a0)
2.2.2 (2021-04-24)
2.2.1 (2021-04-19)
2.2.0 (2021-04-19)
- require.resolve to correct sub node_modules (#3003) (da11d43)
- optimizer: ensure consistency with replace define (#2929) (ddb7a91), closes #2893
- A static and dynamically imported module is loaded twice (#2935) (266fb55)
- avoid endless loop in resolveSSRExternal (fix #2635) (#2636) (59871ef)
- don't resolve import using browser during SSR (fix #2995) (#2996) (fd1c9ba)
- filter out empty srcset, fix #2863 (#2888) (0d4f803)
- build: avoid import duplicate chunks, fix #2906 (#2940) (8b02abf)
- build: properly handle alias key in config merge (#2847) (41261c7)
- build: support
cssCodeSplit
for cjs format, fix #2575 (#2621) (2a89c57) - css: properly pass options to stylus compiler, fix #2587 (#2860) (8dbebee)
- define: ensure the normal use of NODE_ENV, fix #2759 (#2764) (fa85749)
- scan: avoid crawling type only import (#2810) (daf7838)
- ssr: fix ssrTransform catch clause error (fix #2667) (#2966) (c9e0bcf)
- types: clean-css types (#2971) (9be7449)
- chunks are analysed multiple times (#2541) (1451b78)
- serve .js, .jsx, .ts, .tsx as application/javascript, fix #2642 (#2769) (b08e973)
- createLogger: allow custom prefix for logger (#2019) (344d77e)
- add async support for vite config file (#2758) (aee8b37)
- add inlineConfig.envFile option (#2475) (81b80c6)
- export manifest types (#2901) (ffcb7ce)
- parameter settings when packaging the library (#2750) (f17e19a)
- support cacheDir (#2899) (57980d2)
- watch the dependencies of config file (#3031) (bb419cb)
- cli: build watch mode, fix #1434 (#1449) (0dc6e37)
- plugin: plugin config hook supports return promise (#2800) (5dfd0e8)
- plugin-api: support async configResolved hooks (fixes #2949) (#2951) (8b38168)
- support globbing from dependencies (#2519) (7121553), closes #2390
2.1.5 (2021-03-31)
- do not inject ?import query to external urls (be3a4f5)
- replace __dirname and __filename in config file, fix #2728 (#2780) (eb57ac6)
2.1.4 (2021-03-30)
- scan: properly crawl imports in lang=ts blocks in vue/svelte files (8f527fd)
- invalidate module cache on unlinked (#2629), fix #2630 (57f2a69)
- reload only once on socket reconnect (#2340) (d73c1fa)
- client: don't inject queries for data URLs (#2703), fix #2658 (86753d6)
- resolve: fix resolver not following node resolve algorithm (#2718), fix #2695 (669c591)
- resolve: improve browser filed substitutions (#2701), fix #2598 (cc213c6)
- fix types errors (#2726) (9716582)
2.1.3 (2021-03-25)
- add a timeout to the res.sep when discovering dependencies, fix #2525 (#2548) (31d10cb)
- handle paths with special characters in injectQuery (fix #2585) (#2614) (ed321ba)
- css: alias for background url in sass/less link error (fix #2316) (#2323) (9499d26)
- dev: remove process listeners on server close (#2619) (74b360b)
- json should be bundled (#2573) (2eb7682), closes #2543
2.1.2 (2021-03-17)
- update esbuild target to allow destructuring (#2566) (da49782)
- manifest: do not fail when using rollupOtions.external (#2532) (e44cc11)
2.1.1 (2021-03-16)
- decode path before reading sourcemap source content (73b80d5), closes #2524
- scan: handle await replacement edge case (cbfc3e9), closes #2528
- enable latest syntax when parsing for ssr (407ce3b), closes #2526
2.1.0 (2021-03-15)
- json: support importing json with ?url and ?raw queries (fd0a0d9), closes #2455
- ssr: fix mistakenly overwriting destructure variables as import bindings (#2417) (24c866f), closes #2409
- correctly handle explicit ts config file (#2515) (e8f3c78)
- hmr: never invalidate an accepting importer (#2457) (63bd250)
- ssr: handle empty sourcemaps (fix #2391) (#2441) (103dec9)
- fix early logger definiton in resolveConfig (#2425) (96ea9f4)
- Improve how @fs urls are printed (#2362) (5d4e82d)
- Improve injectQuery path handling (#2435) (a5412f8), closes #2422
- keep process running when fail to load config in restarting server (#2510) (b18af15), closes #2496
- make import resolution failures easier to track down (#2450) (f6ac860)
- respect cors and proxy options in preview command (f7d85ae), closes #2279
- url linked to wmr rollup-plugin-container.js found 404 (#2368) (209232c)
- build: respect rollupOtions.external at generate manifest(#2353) (b05a567)
- allow custom websocket server (#2338) (9243cc9)
- bundle vite config file with esbuild instead of rollup (#2517) (e034ee2)
- dev: support keepNames for dependencies (#2376) (b5cd8c8)
2.0.5 (2021-03-02)
- serving static files from root (#2309) (4f942be)
- scan: handle race condition for tempDir removal (#2299) (67e56e4)
- await bundle close (#2313) (c988574)
2.0.4 (2021-02-26)
- build: css tags injection priority (#2272) (55ad23e)
- css: ignore css commonjs-proxy modules (#2160) (de33d32)
- optimizer: detect re-exports in dep entries (a3abf99), closes #2219
- sourcemap: avoid cjs import interop line offset messing up sourcemap (4ce972d), closes #2280
- sourcemap: inject
sourcesContent
for .map requests (#2283) (8d50b18) - ssr: allow ssr module export overwrites (#2228) (6fae0b7)
- add source and sourcesContent to transformed SSR modules (#2285) (72be67b), closes #2284
- optimizer: fix deps aliased to cdns that are imported by optimized deps (06d3244), closes #2268
- ssr: handle imported binding being used as super class (167a9c3), closes #2221
- ssr: handle ssrLoadModule failures in post pending (#2253) (ea323cc), closes #2252
- ssr: ssr transform method definition (#2223) (8e0c0fa)
- decode url before serving static files (#2201) (1342108), closes #2195
- determine anonymous function wrapper offset at runtime (#2266) (a2ee885), closes #2265
2.0.3 (2021-02-24)
- resolve: compat for babel 7.13 helper resolution (39820b9)
- ssr: fix ssr external check for mjs entries (5095e04), closes #2161
- do not prepend base to double slash urls during dev (#2143) (7a1b5c6)
- handle escape sequences in import specifiers (#2162) (bbda31e), closes #2083
- should transform the img tag's srcset arrtibute and css' image-set property (#2188) (0f17a74), closes #2177
- treat the watcher path as literal name (#2211) (58bed16), closes #2179
- use proper esbuild loader for .cjs and .mjs files (#2215) (a0d922e)
- optimizer: let esbuild resolve transitive deps (0138ef3), closes #2199
- scan: avoid replacing await in import specifiers (94e5b9a), closes #2210
2.0.2 (2021-02-22)
- build: do not handle asset url when its url is "#" (#2097) (0092a35), closes #2096
- cli: fix short flags being ignored (#2131) (cbb3eff)
- optimizer: do not optimize deps w/ jsx entrypoints (1857652), closes #2107
- optimizer: externalize jsx/tsx files in dependencies (37a103f)
- optimizer: fix .styl externalization (87cfd9e), closes #2168
- resolve: fix browser mapping fallback (de58967), closes #2115
- scan: set namespace when resolving to html (#2174) (3be4fac), closes #2163
- ssr: avoid duplicate ssr module instantiation on shared imports (a763ffd), closes #2060
- ssr: fix ssr export * from (8ed67cf), closes #2158
- typo (#2149) (2b19e3c)
- ssr: reject ssrLoadModule promises if evaluation fails (#2079) (e303c4e), closes #2078
- stricter html fallback check in transformRequest (d0eac2f), closes #2051
2.0.1 (2021-02-17)
- allow custom process.env.VAR defines (#2055) (7def49a)
- do not error on failed load for SPA html requests (44a30d5), closes #2051
- more inclusive config syntax error hanlding for Node 12.x (27785f7), closes #2050
2.0.0 (2021-02-16)
- css/assets: respect alias in css url() paths (ad50060), closes #2043
- resolve: handle hash fragment in fs resolve (34064c8)
- scan: fix top level await handling in script setup (24ed098), closes #2044
- scan: ignore virtual entries during scan (6dc2d56), closes #2047
- always transform applicable requests (#2041) (4fd61ab)
2.0.0-beta.70 (2021-02-15)
- respect host option when listening (f05ae32), closes #2032
- css: resolve pre-processors from project root (ddfcbce), closes #2030
- reject preload promise if link fails to load (#2027) (f74d65d), closes #2009
- ssr: ignore base when normalizing urls for ssr (26d409b), closes #1995
- make define option perform direct replacement instead (059070e)
- css: allow async additionalData function for css pre-processors (20f609d), closes #2002
- allow
getJSON
option oncss.modules
(#2025) (e324e36)
define
option no longer callsJSON.stringify
on string values. This means string define values will be now treated as raw expressions. To define a string constant, explicit quotes are now required.
2.0.0-beta.69 (2021-02-11)
- fix out of root static file serving on windows (4d34a73), closes #1982
- Remove negative count in stdout with 0 rows (#1983) (09b13ed), closes #1981
- ssr: handle virtual modules during ssr (108be94), closes #1980
- prevent crash on malformed URI (#1977) (f1b0bc9)
- user define on import.meta.env should apply during dev (603d57e)
- pass config env to plugin config hook (19f3503)
2.0.0-beta.68 (2021-02-11)
- css/assets: properly replace multiple css asset urls on the same line (1d805a6), closes #1975
- scan: handle lang=jsx in sfcs (2f9549c), closes #1972
- fix path normalization for windows paths w/ non ascii chars (03b323d), closes #1384
- support --open for
vite preview
command (#1968) (446b815) - resolve: expose full resolve options via config (0318c64), closes #1951
2.0.0-beta.67 (2021-02-09)
- html: avoid duplicate preload link injection (6e71596), closes #1957
- ssr: fix ssr node require for virtual modules (fa2d7d6)
- do not open browser when restarting server (#1952) (9af1517)
2.0.0-beta.66 (2021-02-08)
- import-analysis: fix literal dynamic id false positive (6a6508e), closes #1902
- resolve: avoid race condition in resolve skip check (85f1e7b), closes #1937
- resolve: pass down resolve skip via context (9066f27), closes #1937
- scan: only scan supported entry file types (a93e61d)
- use dedicated endpoint for hmr reconnect ping (b433607), closes #1904
- ssr: ssr external should take scannd imports into account (92934d4), closes #1916
- brotli skipped is printed when build.brotliSize is false (#1912) (db3c324)
2.0.0-beta.65 (2021-02-05)
- build: ignore html asset urls that do not exist on disk (02653f0), closes #1885
- better dependency non-js type file handling (1fdc710)
- dev: check wasClean in onclose event (#1872) (5d3107a)
- resolve: prioritize file over dir with same name for resolve (c741872), closes #1871
- ssr: respect user defines for ssr (3fad3ba)
- do not include vite in ssr externals (578c591), closes #1865
- css: use default CSS modules localsConvention settings (fee7393)
- cli: make --ssr flag value optional (3c7b652), closes #1877
- proxy: support conditional options for proxy request (#1888) (e81a118)
- support absolute glob patterns (159cc79), closes #1875
- support resolving style/sass entries in css @import (f90a85c), closes #1874
- improve resolve cache (6a793d3)
- css: CSS modules now defaults to export class names as-is.
To get camelCase exports like before, explictly set
css.modules.localsConvention
via config.
2.0.0-beta.64 (2021-02-03)
- ssr: do not resolve to optimized deps during ssr (d021506), closes #1860
- ssr: fix externalized cjs deps that exports compiled esmodule (8ec2d6f)
2.0.0-beta.63 (2021-02-03)
- css: hoist external @import in concatenated css (000ee62), closes #1845
- css: respect sass partial import convention (cb7b6be)
- vite: close server and exit if stdin ends (#1857) (b065ede)
- consistently use mode for NODE_ENV in deps (cd13ef0)
- do not shim process with actual object (8ad7ecd)
- make ssr external behavior consistent between dev/build (e089eff)
- only close if http server has listened (94a8042), closes #1855
- scan: handle import glob in jsx/tsx files (24695fe)
- ssr: improve ssr external heuristics (928fc33), closes #1854
- respect config.build.brotliSize in reporter (1d5437d)
- ssr: graduate ssr method types (0fe2634)
2.0.0-beta.62 (2021-02-02)
- properly cascade asset hash change (f8e4eeb)
- optimizer: fix cjs interop check on entries with identical ending (338d17a), closes #1847
- scan: handle tsx lang in SFCs during dep scan (#1837) (be9bc3f)
- dev: inject env for webworker (#1846) (5735692), closes #1838
- better build output + options for brotli / chunk size warning (da1b06f)
2.0.0-beta.61 (2021-02-01)
- less: fix less @import url rebasing (41783fa), closes #1834
- manifest: include assets referenced via CSS in manifest entries (34894a2), closes #1827
- yarn pnp resolveDir (9c6edef)
- optimizer: fix cjs export interop for webpacked output (4b6ebc3), closes #1830
- ssr: do not inject hmr timestamp when transforming for ssr (#1825) (8ace645)
2.0.0-beta.60 (2021-01-31)
- hmr: do not update on file unlink when there are no affected modules (#1818) (59fe913)
- optimizer: entry resolving for yarn pnp (febff7b), closes #1813
- optimizer: fix cjs interop for packages that cannot be (3b85296), closes #1821
- scan: skip non-absolute resolved paths during scan (f635971)
- support ?url special query (0006e89)
2.0.0-beta.59 (2021-01-30)
- optimizer: exclude should apply to deep imports (3c22f84)
- optimizer: separate dep entry proxy modules from actual modules (8e1d3d8)
2.0.0-beta.58 (2021-01-29)
- optimizer: handle rollup plugin virtual ids (a748896), closes #1804
- do not generate import specifier if not needed (e438802)
- add ViteDevServer.transformIndexHtml method for ssr (dbe1f4a), closes #1745
- support configuring publicDir via config (470ceb8), closes #1799
2.0.0-beta.57 (2021-01-29)
- optimizer: fix entry cross imports (a9ca3da), closes #1801
- optimizer: respect ids that resolve to external urls during scan (328b6b9), closes #1798
- still account for plugins in optimizer hash (82dce90)
- optimizer: check qualified deps length after accounting for include (6a03813)
- optimizer: exclude ?worker and ?raw from runtime dep discovery (d216da0)
- optimizer: properly externalize unknown types (c3b81a8), closes #1793
2.0.0-beta.56 (2021-01-29)
- use esbuild service mode during pre-bundling (b24b07c)
2.0.0-beta.55 (2021-01-28)
- optimizer: use js loader for resolved mjs files in esbuild (0f2c2ce)
2.0.0-beta.54 (2021-01-28)
- optimizer: map entries to their file paths when passed as importer (32ba8fb)
2.0.0-beta.53 (2021-01-28)
- css: pure css chunk removal + manifest entry with multiple css files (cadf38c), closes #1776
- optimizer: add separate hash for invalidating optimized deps (216ae8e)
- optimizer: externalize json (c3e52f2)
- optimizer: invalidate all modules on deps rebundle (02053a2)
- optimizer: use vite resolver for yarn 2 fallback (475aae4), closes #1778
- fix pure css chunk removal (d69d49d)
- optimizer: use all inputs for optimized entry matching (9ecf52b), closes #1769
- dependency scan with esbuild when using non-HTML entrypoints (#1772) (ca862a2), closes #1763
- hold missing dep requests while re-bundling (8e28803)
- more stable request hold (be0e698)
- Revert "chore: remove unused logic" (6b154f0)
- css: the "css" property of build manifest entries is now an array because it is possible for an entry to link to multiple generated css files.
2.0.0-beta.52 (2021-01-28)
- optimizer: fix ?raw import and import with queries in pre-bundling (2f1efa3), closes #1759
- always normalize fs prefix slashes (99e4edd)
- optimizer: fix optimizer updates on new dep discovery (b2110af), closes #1755
2.0.0-beta.51 (2021-01-27)
- avoid removing double slash in fileToUrl (f6db155)
- build: ensure lib mode file name is correctly inferred for scoped packages (#1754) (c2e8806)
- hmr: fix hmr for @fs urls (b5987c1), closes #1749
- optimizer: attempt resolve node builtin first before externalizing (74b55b8), closes #1746
- allow ssr css preloads in preload-helper (#1734) (1dfda16)
- handle vite client path with dollar signs (#1732) (20bacf7), closes #1423
- scan on windows (5f7698b)
- optimizer: entry matching for .mjs entries (ebe71c4), closes #1739
- css @import alias for windows (71fcfdf)
- don't override resolver options (#1740) (73196e5)
- resolve css @import relative imports without leading dot (78eb32c), closes #1737
- optimizer: do not perform tree-shaking for pre-bundling (6b619c4)
- adjust optimizeDeps options (fd5e7c0)
- auto re-run dep optimization on discovery of new imports (470b4e4)
- dep optimizer entry option (64ba807)
- import resolving + url rebasing for less (f266bb7)
- new manifest format (51bc1ec)
- proper css resolving + sass import url rebase (477f174)
- use esbuild to scan imports (d0f8b12)
- css: support alias in css @imports (82d87d9), closes #650
optimizeDeps
options have been adjusted.- Dependencies are now automatically scanned from source code. There is no longer the need to specify deep imports.
optimizeDeps.include
andoptimizeDeps.exclude
now expect typestring[]
.optimizeDpes.link
andoptimizeDeps.auto
are removed.
- the build manifest format has changed. See https://vitejs.dev/guide/backend-integration.html for more details.
2.0.0-beta.50 (2021-01-26)
- json plugin error report line regex (#1719) (35e1f52)
- optimizer: externalize cross-package imported css (0599908), closes #1722
- optimizer: fix entry analysis fs read on case-sensitive systems (1a9b321), closes #1720
- optimizer: fix entry matching edge case (c5fe45f), closes #1661
- optimizer: handle special case where esm entry gets converted to cjs by esbuild (32413ce), closes #1724
- optimizer: pnp compat to match relative paths (#1714) (8fb74f5)
- sourcemap: empty source map chain on nullified sourcemap (52c9416), closes #1726
- properly handle base + path in hmr config (1e67d66)
- allow speicfying ssr entry directly via build.ssr option (45d8bf4)
2.0.0-beta.49 (2021-01-25)
- config: fix native esm config loading on windows (33d3cca)
- optimizer: entry matching on windows (e6120d5)
- optimizer: fix output to entry matching logic (6c96883), closes #1704
- ssr: generate same asset url links for ssr build (68960f7), closes #1711
- watcher: ensure only add normalized file paths (a19c456)
- watcher: watch fs specific root paths (64d2c17)
- do not move css modules to vendor chunk (3d55e83), closes #1703
- fix hmr.path option normalization (cbeb9ba), closes #1705
2.0.0-beta.48 (2021-01-25)
- externalize known css types during dep-prebundling (02a0324), closes #1695
- fallback to static middleware on unfound source maps (2096309)
- preload marker incorrect replacement (7f83deb)
- remove preload markers in all cases (6cd2d35), closes #1694
- resolve library entry (3240db1)
2.0.0-beta.47 (2021-01-24)
- do not apply json plugin to commonjs proxy (a92f430), closes #1679
- esbuild optimizer yarn 2 pnp compat (028c3bb), closes #1688
- fix incorrect preload placeholder regex (5ca43ef), closes #1686
- fix server.watch option ignore overwriting defaults (#1680) (33cffa3)
2.0.0-beta.46 (2021-01-24)
- css: fix extract concurrency issue when disabling cssCodeSplit (4ac7e7e)
2.0.0-beta.45 (2021-01-24)
- hmr: fix nested hmr accept calls with base (2950c3c)
- hmr: preserve host when updating link CSS (60f9782), closes #1665
- html: ensure quote in rebased asset urls in html (7306610), closes #1668
- import-anaysis: markPos out-of-range for overwrite (#1671) (226e984)
- optimizer: repsect alias in pre-bundling (2824d06), closes #1674
- resolve: handle paths starting with slash in entry fields (13da32e), closes #1676
- import analysis dynamic import check (d4909b9)
- revert trailing slash handling + improve dev base usage (01e9ac0), closes #1664
- support empty, relative and external base values (00bc446), closes #1669
- default vendor chunk splitting (f6b58a0)
- disable prompts and clearScreen on CI (63dd1a2), closes #1673
- source map for optimized deps (972b13e)
- support stringifying json (98c321b), closes #1672
- vite preview command for previewing build output (a198990), closes #1627
2.0.0-beta.44 (2021-01-23)
- esbuild dep resolving on windows (62e4d72)
2.0.0-beta.43 (2021-01-23)
- optimizer: force vite resolver for esbuild pre-bundle (4c4d629)
2.0.0-beta.42 (2021-01-23)
- optimizer: ensure esbuild use vite-resolved entries (bdb9b3c)
2.0.0-beta.41 (2021-01-23)
2.0.0-beta.40 (2021-01-23)
2.0.0-beta.39 (2021-01-23)
- optimizer: fix es interop heuristics for entry with only export * from (ef1a7e3)
- ssr: do not inject ?import query for ssr transforms (7d26119), closes #1655
- hmr port fallback in middlewareMode (36a9456)
- ssr: avoid resolving externals to mjs (3955fe3)
- file dir resolve should prioritize package.json (ce2d49a)
- ssr: remove import query in ssrLoadModule (80473c1)
2.0.0-beta.38 (2021-01-23)
- dev: remove comment for sourcemap reference at debug (#1658) (16248c0)
- optimizer: improve exports analysis (406cbea)
- ssr: fix ssr transform edge cases (f22ddbd), closes #1646
- exclude spa-fallback middleware in middlewareMode (#1645) (843c879)
- remove optimizeDeps.plugins (38524f6)
- esbuild based dep pre-bundling (6e7f652)
- support
base
option during dev, deprecatebuild.base
(#1556) (809d4bd)
optimizeDeps.plugins
has been removed. The dep optimizer is now usingesbuild
, and all non-js files are automatically externalized to be processed by Vite's transform pipeline when imported.
2.0.0-beta.37 (2021-01-22)
- css: fix url rewriting in @imported css (52ae44f), closes #1629
- manifest: avoid chunks with same name overwriting one another (cf81aa3), closes #1632
- ssr: do not inject inlined css in ssr build (5d77665), closes #1643
- always reload when html is edited in middleware mode (85c89be)
- handle esm config syntax error in Node 12 (20cf718), closes #1635
- normalize paths for cjs optimized deps on windows (#1631) (b462e33)
- still resolve jsnext fields (4e0cd73)
2.0.0-beta.36 (2021-01-21)
- always reload when html is edited in middleware mode (85c89be)
- still resolve jsnext fields (6e06108)
2.0.0-beta.35 (2021-01-20)
- allow direct inspection of static file via browser (a3c334f), closes #1612
- also resolve for module condition (3a3029e), closes #1583
- do not apply jsxInject on ts files (a72a59c)
- inline async css for legacy builds (940d483)
- manually test global regex codeframeRE index (#1608) (20d6c0f)
- properly format css pre-processor errors from @imported files (ec18bde), closes #1600 #1601
- asset: use stricter asset url marker and regex (e6c8478), closes #1602
- plugin-dynamic-import: include assetDir in dynamic import polyfill module path (#1610) (47ff0f4)
- resolve: get pkg from importer for relative id (#1599) (c821f09)
- manifest: include dynamic entries and dynamic imports (#1609) (9ed4908)
- detect and warn against imports to transitively optimized deps (3841e70), closes #1543
2.0.0-beta.34 (2021-01-20)
- default changeOrigin to true in proxy option shorthand (b008bd5), closes #1577
- emit css only once when there are multiple outputs (6bce108), closes #1590
- optimizer: handle commonjs require css (#1568) (3d09b50), closes #1566
- handle legacy chunks in manifest (123b6f6), closes #1551
- use safe dynamic import rewrite (5cb02ce), closes #1563
- hmr: fix hmr invalidation on circular deps (ca8442c), closes #1477
- resolve: node resolve from virtual modules (c6d5ed8)
2.0.0-beta.33 (2021-01-19)
2.0.0-beta.32 (2021-01-19)
- avoid preloading owner chunk (61969d7)
- ssr transform check valid inMap (bf4b3e9)
- support resolving .json ext to be consistent with Node (a1d1dde)
- rename ViteDevServer.app -> ViteDevServer.middlewares (394390a)
- import.meta.env.SSR (fe7396d)
- ssr manifest for preload inference (107e79e)
- ssr: isolated mode (e954ed2)
- ssr sourcemap + stacktrace fix (6cb04fa)
ViteDevServer.app
is nowViteDevServer.middlewares
. In addition, Vite no longer servesindex.html
in middleware mode. The server using Vite as middleware is responsible for serving HTML with/@vite/client
injected.
2.0.0-beta.31 (2021-01-18)
- workaround for ts config + native esm w/ imports (4a7d2eb), closes #1560
- resolve: also respect browser mapping of dependencies (12b706d), closes #1547
2.0.0-beta.30 (2021-01-15)
- config: delete cache correctly when restarting server (#1541) (bd3b1bf)
- config: load native esm ts config string with base64 encoding (55b05db), closes #1548
2.0.0-beta.29 (2021-01-14)
- optimizer: fix empty exclude filter (4579c38)
- fix graceful shutdown on sigint (fe7238c)
- warn failed source map load instead of erroring (7a1261b)
2.0.0-beta.28 (2021-01-14)
- alias should work for optimized deps (54dab71)
- serve out of root static file on windows (#1537) (506bf2d)
- dev: correct responce for html qurey (#1526) (49d294d), closes #1524
- optimizer: should respect rollup external during pre-bundling (db97317), closes #1528
- add clearScreen option (c5c3298)
- close server on sigint/sigterm (4338d7d), closes #1525
- support specifying URL path via server.open option (#1514) (25e9c44)
- support using vite as a middleware (960b420)
2.0.0-beta.27 (2021-01-13)
- vite: support RegExp strings as server.proxy keys (#1510) (f39a2aa)
- warn unintended dependency during pre-bundling (ae6cc27)
2.0.0-beta.26 (2021-01-13)
- properly externalize resolved external urls (6cda88d)
2.0.0-beta.25 (2021-01-12)
- support aliasing to external url (abf7844)
2.0.0-beta.24 (2021-01-12)
- hmr: watch file changes even when HMR is disabled (#1504) (cc5fa6e)
- always replace preload marker with value (2d6f524)
- more consistent outDir formatting (50bff79), closes #1497
- show target build mode in logs (#1498) (ae2e14b)
- support import.meta.url in ts esm config file (cf5f3ab), closes #1499
- allow browser new window view source (#1496) (1629c54)
- require explicit option to empty outDir when it is out of root (730d2f0), closes #1501
2.0.0-beta.23 (2021-01-12)
2.0.0-beta.22 (2021-01-11)
- handle http proxy error (4ca20f2), closes #1485
- optimizer hash should take inline mode into account (0aed0e8), closes #1490
- support resolved Ids that start with null bytes (7074414), closes #1471
- config: support native esm config on windows + support TS config in native esm projects (803f6da), closes #1487
- resolve: support subpath patterns + production/development conditinals in exports field (62cbd53)
- server: add strict-port option (#1453) (0501084)
2.0.0-beta.21 (2021-01-11)
- properly remove dynamic import args for full dynamic imports (d9c3fdb)
2.0.0-beta.20 (2021-01-11)
- optimizer: exclude should not be resolve (#1469) (f8c34ee)
- resolve: heuristics for browser vs. module field (1865e6e), closes #1467
- allow passing options to rollup commonjs plugin via build.commonjsOptions (6ed8e28), closes #1460
- async chunk loading optimizations (e6f7fba)
2.0.0-beta.19 (2021-01-10)
2.0.0-beta.18 (2021-01-10)
- fix dynamic import with parent relative paths (bbfe06c), closes #1461
- optimizer: properly externalize css/asset imports in optimized deps (5d180db), closes #1443
- optimizer: support specifying plugins for the optimizer (1ea0168)
2.0.0-beta.17 (2021-01-10)
- support glob import under
import.meta.glob
(23d0f2b)
- Glob import syntax has changed. The feature is now
exposed under
import.meta.glob
(lazy, exposes dynamic import functions) andimport.meta.globEager
(eager, exposes already imported modules).
2.0.0-beta.16 (2021-01-09)
- inject css link when cssCodeSplit is disabled (51a02ff), closes #1141
- set NODE_ENV for build (d7ceabe), closes #1445 #1452
2.0.0-beta.15 (2021-01-09)
- hmr: ensure all modules are fetched as import (98bc767)
2.0.0-beta.14 (2021-01-09)
- support ../ paths in glob import (7f399e1)
2.0.0-beta.13 (2021-01-09)
- always rebase path against root (d704b7c), closes #1413
- handle potential imports that has no correspodning chunks (d47e10c)
- raw fetch requests should not be transformed (0356c3c), closes #1433
- skip cjs rewrite for export * declarations (cca015b), closes #1439
- cli: fix help for --root (#1429) (7a55c5b)
- dev: decode url before
sirv
resolve (#1432) (7cc3cf1), closes #1426
- allow user define to overwrite default process.env. defines (351ad4e)
- build support for data uri import (4fd0b86)
- support import "glob:./*" (8d8e2cc)
2.0.0-beta.12 (2021-01-07)
- plugin-legacy: avoid esbuild transform on legacy chunks (7734105)
2.0.0-beta.11 (2021-01-07)
- preserve html comments during dev (b295400), closes #1420
- resolve: respect exports env key order (b58c860), closes #1418
- avoid excessive quote in css public urls (1437129), closes #1399
- do not rewrite dynamic import if format is not native es (eb35bd5)
- esbuild transform should filter id with and wihtout query (4cda5be)
- fix cache invalidation for non-optimized deps with cross imports (11c407a), closes #1401
- html transform should not render boolean attr with false value (a59ffef)
- remove vue from optimize ignore list (9eab790), closes #1408
- support serving extension-less files in /public (a7bca9c), closes #1364
- build: inline quotes css url to base64 (#1412) (9b5b352), closes #1409 #1413
- pass
configFile
via inline config instead of extra arg in most (24b3b5a)
- support specifying mode in user config (396bbf8), closes #1380
- plugin-legacy: @vitejs/plugin-legacy (8c34870)
- proxy: add rewrite support for ws (#1407) (fa3bc34)
- also expose correspodning chunk in build html transform (b2f4836)
- expose loadConfigFromFile API (#1403) (9582171)
-
the following JavaScript APIs now expect
configFile
as a property of the config object passed in instead of an argument:createServer
build
resolveConfig
2.0.0-beta.10 (2021-01-06)
- alias: normalize alias behavior when there is ending slash (c4739a3), closes #1363
- build: Pass
allowNodeBuiltins
to rollup instead of empty array (Fixes #1392) (#1393) (f209ad9) - avoid replacing process.env member expression (c8f4bb9), closes #930
2.0.0-beta.9 (2021-01-06)
- properly handle browser: false resolving (da09320), closes #1386
- properly handle ts worker source (eea1224), closes #1385
- env: also expose VITE_ variables from actual env (956cd2c)
2.0.0-beta.8 (2021-01-05)
- resolve: handle exports field w/ mapped directory (724aa8a)
- build: default build target to 'modules' with dynamic import polyfill (756e90f)
- allow boolean attr values in html transform tag descriptors (#1381) (0fad96e)
2.0.0-beta.7 (2021-01-05)
- update client type usage (245303c)
-
client types are now exposed under
vite/client.d.ts
. It can now be included via the followingtsconfig.json
:{ "compilerOptions": { "types": ["vite/client"] } }
2.0.0-beta.6 (2021-01-05)
- css: ensure options for .styl (b3237ff), closes #1351
- error-handling: avoid serilaizing unnecessary error properties when seinding to client (61aec65), closes #1373
- optimizer: optimizer should not be affected by config rollup options (ba08310), closes #1372
- support aliases in html references (68eac64), closes #1363
- optimizer: resolve linked dep from relative root (#1375) (034bbcd)
- remove the need for specifying
transformInclude
(99522d0)
- exclude vue from optimization (1046fe0)
- improve import analysis fail warning (2b39fce), closes #1368
-
transformInclude
option has been removed and is no longer necessary. This allows full dynamic imports to custom file types to automatically qualify for the transform pipeline.-
All requests that accept
*/*
AND is not declared an asset type will now qualify for the transform pipeline. -
To exclude an asset type from being transformed when requested directly, declare it as asset via
config.assetsInclude
.
-
2.0.0-beta.5 (2021-01-05)
- only append dep version query for known types (42cd8b2)
- css: fix css comment removal (7b9dee0), closes #1359
- css: inline css in all non-entry split chunks (e90ff76), closes #1356
- do not bundle resolve for yarn 2 compat (3524e96), closes #1353
- do not error on unresolved commonjs externals (60a4708), closes #1339
- only allow built-ins as externals if building for ssr (804c9a3)
- run mutiple output builds sequantially (ab80522)
- types: separate client type shims from main types (0cddbbc)
- default clean-css level to 1 + expose options (ef100d0), closes #936
- support plugin.apply (d914b54)
2.0.0-beta.4 (2021-01-04)
- stop service in build esbuild plugin as well (1a90b4e)
- build: rollup import resolving message (#1336) [skip ci] (87d55f4)
- resolve: always prioritize browser field (409988f)
- @fs paths resolving for win32 (#1317) (0a94c88)
- do not error on css deep imports (25adf1e)
- ensure consistent module entry urls by removing import query (2b82e84), closes #1321
- load source map from sourceMappingURL comment (#1327) (1f89b0e)
- sourcemap path mangled by browser (#1326) (1da12ba), closes #1323
- dev: display localetime correctly (#1310) (06663a7)
- esbuild.(include|exclude|jsxInject) (b5b1496)
- wasm: use
instantiateStreaming
when available (#1330) (2286f62), closes #1143 - export normalizePath helper (#1313) (37d1a5d)
2.0.0-beta.3 (2021-01-03)
- build: fix import-fresh shim (b57d74c), closes #1306
- decode incoming URL (f52db58), closes #1308
- keep
this
defined inconfigureServer
hook (#1304) (b665b92) - resolve: prioritize module + avoid mutating path when (6ce6d5c), closes #1299
- dedupe option (7858e62), closes #1302
- export
resolvePackageData
andresolvePackageEntry
helpers (#1307) (38b9613) - expose
loadEnv
in public api (#1300) (9d0a8e7)
2.0.0-beta.2 (2021-01-02)
- do not attempt to transform html requests (a7a5c5b)
- fix spa fallback on paths ending with slash (60fe476)
- resolve: prioritize browser field (dfef3de), closes #1154
- resolve: resolve inline package (e27fe30), closes #1291
- dynamic load postcss plugin (#1292) (00c7370), closes #1287
- fix transform result check for empty result (2adfa8b), closes #1278
- hmr: pass context object to
handleHotUpdate
plugin hook (b314771)
- hmr:
handleHotUpdate
plugin hook now receives a singleHmrContext
argument instead of multiple args.
2.0.0-beta.1 (2021-01-02)
- --open and --filter arguments (#1259) (0c0bc4a)
- handle hmr errors (ff2b3ce)
- overlay z-index (6b3278e)
- css: respect minify option for chunk css (6a287a1)
- also call buildEnd on container close (94a8def)
- provide default typing for supported file types (a9c7eac)
- support resolveId returning arbitrary value (b782af4)
2.0.0-alpha.5 (2020-12-30)
- css: properly prevent css from being tree-shaken (7f08835)
2.0.0-alpha.4 (2020-12-30)
- css: fix cssCodeSplit: false (9a02203)
- disable cssCodeSplit by default in lib mode (e64509a)
- fix terser worker thread when vite is linked (a28419b)
- inline assets in lib mode (c976d10)
2.0.0-alpha.3 (2020-12-30)
2.0.0-alpha.2 (2020-12-29)
- plugin-vue: avoid throwing on never requested file (48a24c1)
2.0.0-alpha.1 (2020-12-29)
- new universal plugin format
- framework agnostic core
- smaller and faster install
- improved JS API
- improved alias and resolving
- improved page reload performance (strong caching of npm deps)
- error overlay
- better vue perf (single request in most cases)
- multi entry mode
- lib mode