1.0.0-beta.11 (2020-07-03)
1.0.0-beta.10 (2020-07-02)
1.0.0-beta.9 (2020-07-02)
- import.meta.env fallback for build (7994d35)
- should treat css linked in html as assets (08856ac)
- build: shouldn't generate css file if without css import (#473) (1b61550), closes #472
- build/css: properly handle css linked in index.html for build (1fa4d9a)
- dev/css: fix hmr for css referenced in html via
<link>
(202ee6e), closes #469 - hmr: fix nested import.meta.hot/env detection (bc4ae27)
- hmr: root level self-accepting module (0179c47)
- CSS Modules detection for preprocessors (#463) (a26d61b)
- connect to actual vite server port for websocket (b6e91e0), closes #452 #460
- option for disabling esbuild (#475) (b42c5ed), closes #456
1.0.0-beta.8 (2020-06-25)
- require generateCodeFrame from listed dep (8fc68c0)
1.0.0-beta.7 (2020-06-24)
- fallback to <style> insertion when css contains @import (422b4aa), closes #448
- fix css url rewriting for url containing parens (601a13d), closes #447
- fix env replacement for vite internal modules (cebe2e9), closes #451
- improve css url rewriting (7305c5b)
- optimizedeps.allowNodeBuiltins (07af6f4)
- build: skip brotli check for assets (63c4a42)
1.0.0-beta.6 (2020-06-24)
- fix connection lost polling (298c78d)
- preserve symlinks in resolver for yarn pnp virtual compat (#442) (ba2f91d)
- skip relative resolving for absolute paths (e0a0258), closes #445
- ws over https (7fe66cc), closes #440 #436
- dev: fix css update and remove (#444) (0ff8ae3)
1.0.0-beta.5 (2020-06-23)
- hmr: bail on circular imports when walking import chain (b31e56a), closes #438
- resolver: fix fileToReqest reverse alias check (1a3730a), closes #435
- ignore css comment in build (#432) (98ff7a1), closes #426
- improve css insertion performance on large stylesheets (1c806e6)
1.0.0-beta.4 (2020-06-22)
1.0.0-beta.3 (2020-06-22)
- fix ws poll address (0c1fa7d)
- include importMeta.d.ts in npm package (#420) (40200f8)
- respect env provided via config (b0b91b1), closes #417
- should not emit assets that are inlined (77dad04)
- dev: should use real file path as relative root (#422) (e6561c0)
- Allow plugins to overwrite the cachedRead function (close #402) (49d50ee)
- support directly importing wasm (40cbbb3)
- support http2 (f4fd832), closes #424
- support importing web workers as
import "./worker?worker"
(8af15d2), closes #403
1.0.0-beta.2 (2020-06-21)
- dev: should use real file path as relative root (#422) (e6561c0)
- include importMeta.d.ts in npm package (#420) (40200f8)
- respect env provided via config (b0b91b1), closes #417
1.0.0-beta.1 (2020-06-19)
- adjust env loading order due to dotenv expand (74ef32c)
- expose env variables on
import.meta.env
(51e9c83) - Type declarations now automatically augments
import.meta
- support dotenv expand (7a4606d)
- support returning source map from transforms (3ca09b0)
-
env variables are now exposed on
import.meta.env
instead ofprocess.env
.-
For example, with a
.env
file containingVITE_FOO=1
, you can access it asimport.meta.env.VITE_FOO
. -
Only variables that start with
VITE_
are exposed to the client code. This is because sometimes users may use the same.env
file for build scripts or other server-side code where it may contain sensitive information that should not be exposed in client-side code. -
import.meta.env.MODE
will be the mode the app is running in (default isdevelopment
in dev andproduction
in build). -
import.meta.env.BASE_URL
will be the base public URL as specified via thebase
config option. -
import.meta.env.DEV
will betrue
when mode isdevelopment
. -
import.meta.env.PROD
will betrue
when mode isproduction
. -
process.env
is still shimmed because some dependencies rely on it, but will only exposeprocess.env.NODE_ENV
and will not contain any user env variables.
-
-
__DEV__
magic flag has been removed -
transform API has been adjusted.
-
Both
test
andtransform
functions now receive a transform context object instead of multiple arguments. The transform context has the following type:interface TransformContext { code: string // only available in `transform` id: string // full id including query path: string // file path without query query: Record<string, string | string[]> // parsed query object isImport: boolean isBuild: boolean }
-
Vue custom block transform functions now also receive the same transform context object instead of multiple arguments.
-
0.20.10 (2020-06-19)
- fix relative resolving for windows (abf3f7a)
- resolve extension for deep module imports (a4d84b1), closes #391
- dev: read file as buffer (#398) (5ee1d15), closes #395
- dev: resolve correct outside relative imports from aliased dir (#407) (cae1038), closes #396
decodeURIComponent
for module resolve (#393) (91f696b), closes #392- serve source map file inside linked pkg (#379) (f28f5b6)
- use correct fallback for mime-types in cachedRead (6047305), closes #409
0.20.8 (2020-06-11)
- avoid unnecessary css processing when source did not change (a792610), closes #383
- skip rewrite for css requests (88f411e)
0.20.7 (2020-06-08)
0.20.6 (2020-06-08)
- exclude hmr from path alias mapping (4ed19b9), closes #357
- fix isAsset test false positive (#359) (47923c7)
- normalize public path for index.html src references (6ed9f0b)
- properly handle entry alias for optimized deps (ed5b668)
- wrong dep in the error message of node-built-in-bail (#366) (a8c22de)
0.20.5 (2020-06-05)
- ensure postcss-import is applied first (a383ec3), closes #355
- proper handling of custom postcss config for build (5b1e25d), closes #354
0.20.4 (2020-06-05)
- fix html accept check (#353) (ef0b453)
- ignore certain types of dynamic import plugin warnings (88b41de)
0.20.3 (2020-06-04)
- check loc presence when reporting sfc parse / compile errors (9fc8020)
- consist url to open in browser with https option (#338) (32669ba)
- fix css url rewrite for plain css (2e44e71)
- fix regression when using multiple transforms (#333) (cd1dae4)
- force reload on SFC scoped status change (1a7243a), closes #348
- module rewrite in unoptimized dep (#344) (ec698ff)
- support ts import in config file (3df3ecd), closes #340
- optimize: properly handle css and assets in optimized deps (944e163), closes #337
- support variable interpolation in dynamic imports (fc59642), closes #339
- dev: gen code frame for top level used hmr api (#346) (5cdbc46)
- support
cssPreprocessOptions
(#335) (13d4fc2), closes #332
0.20.2 (2020-06-02)
0.20.1 (2020-06-02)
- ensure correct vue reference in compiled templates (f26b8a7)
0.20.0 (2020-06-02)
- bust index.html short paths in sw mode (379eccd)
- fix resolving deps with css entry (again) (6e06fcf)
- resolve: properly resolve un-optimized nested dependencies + support pnpm (ad14ef4), closes #324
- dynamic-imported module can HMR if it is self-accepting (36afeb7)
- only perform file resolve redirect when not asking for html (f28b88f), closes #323
- optimizeDeps.link (2615f52)
- support custom blocks (#316) (8d6ca75)
- support explicitly adding deep imports to optimized deps (e2167fe)
optimizeDeps.include
behavior has changed. Instead of limiting optimized deps to only those listed ininclude
, it now adds the list to already qualified deps instead. It now also supports deep paths, so can be used to explicitly pre-bundle modules that can only be accessed via deep imports (e.g.lit-html
directives)
0.19.3 (2020-05-31)
- perform vue resolution with strict basedir (e3f0364)
0.19.2 (2020-05-31)
0.19.1 (2020-05-31)
- better module id regex for builtin bail message (#310) (29e36ab)
- use strict resolving for vue resolution (ee60f64)
- bring back browser field resolution with consistent behavior (a0272f0)
0.19.0 (2020-05-30)
- remove incorrect conditional exports handling (3fdfe8a)
- remove support for browser fields. (ce3ec6c)
- respect module over browser field during dev (c790499), closes #307
-
support for resolving
browser
field has been removed.The
browser
field has very inconsistent usage across the ecosystem and is often used in a way that conflicts with ES-module-first tooling (e.g. firebase/app points browser to cjs build).
0.18.1 (2020-05-29)
- add vite to ignore list of optimization (#297) (cddbebc)
- fix browser field resolving on windows (8144044)
- resolve browser field in package.json (#301) (28d9714), closes #294
- support reference a scss files which installed to node_modules (#302) (d623437), closes #291
- use full mime lookup in cached read (#303) (7a59ec8)
- bail early on failed optimization of Node dependencies (0752910)
0.18.0 (2020-05-28)
- should apply full ext resolve on module entries (63b0e3c)
- should resolve env even without config file (482bd34), closes #290
-
The following config options have been removed:
rollupPluginCommonJSNamedExports
optimizeDeps.commonJSWhitelist
CommonJS deps are now optimized by default.
0.17.2 (2020-05-28)
- compat for package entries without extension (6269b7f), closes #284
- import.meta.hot should be injected before first
if (import.meta.hot)
(#285) (9ac63b1)
0.17.1 (2020-05-27)
- hmr: avoid fetching stale modules on nested hmr updates (0554f06)
- fix export default rewrite when at beginning of file (3045112)
- fix import chain walking (9a44248)
- lazy require @vue/compiler-dom so it respects NODE_ENV (e2594df)
- remove query from resolved src import (0330b2a)
- resolve full extension for SFC src imports (ae6b49d)
0.17.0 (2020-05-26)
- await rollup resolve result (#267) (d71a06d)
- css cache check (#262) (5435737)
- default mode for build API usage (86d2143)
- dotenv debug option (#263) (ca1b551)
- fix type dependencies (e86da9e)
- only append import query if has no existing query (df526b1)
- ora swallow rollup warning (#269) (610a004)
- resolve vuePath in all cases (e67b698), closes #270
- respect user configured css modules options for rollup-plugin-vue (0ce1eef)
- unset service when stopping esbuild service (dd0205f)
- updateType may contains extra & (#260) (301d7a3)
- use more robust export default replacement for SFC scripts (2e81e64), closes #271
- expose process.env.BASE_URL (9503762)
- support referencing public dir files from root (319b37b)
- hmr: re-design HMR API (a68bfc3)
- revert special handling for vue hmr (43ccaf7)
-
__BASE__
special global has been removed. Useprocess.env.BASE_URL
instead. -
hmr: HRM API has been re-designed.
-
All HMR APIs are now exposed on
import.meta.hot
and HMR API calls should be nested insideif (import.meta.hot) {}
conditional checks. -
import.meta.hot.accept()
is now only used for self-accepting updates. -
import.meta.hot.acceptDeps()
is now used for accepting dependency updates without re-instantiating acceptor. -
import.meta.hot.data
is an object that is persisted across hot updates of a module. -
import.meta.hot.dispose()
callback now receives the persisted data object. -
import.meta.hot.decline()
can be used to decline updates and if the module is affected in an HMR update chain and force full page reload. -
import.meta.hot.invalidate()
can be used inside an acceptance callback to conditionally reject the update and force full page reload.
See
hmr.d.ts
for full API definitions. -
0.16.12 (2020-05-25)
- fix rewrite extension appending for out of root files (84fcfb6)
- use upward search for env files (4fceaea)
- support webp as static assets (5589fa3)
0.16.11 (2020-05-25)
- fix history fallback when serving non cwd root (fix #251) (c239067)
- fix plain css reference via link (fix #252) (146a49d)
- fix unused css filter check on windows (3486d21)
- more graceful handling for packages with no main field (8816d3b), closes #247
- skip hmr for unused css (#253) (8f7ee38)
- build: should ignore assets hash and query (#256) (528aad6)
0.16.10 (2020-05-24)
- DEV replace should also apply to vite modules (7c4b64c)
- fix build resolve for vue jsx shim (1f4518b)
0.16.9 (2020-05-23)
0.16.8 (2020-05-23)
- defaultRequestToFile should consider optimized modules (#239) (b5ddcdc)
- properly resolve file extensions (aaf61f4), closes #237
0.16.7 (2020-05-22)
- defaultRequestToFile should handle uncached node_modules request (#230) (7a3e822), closes #228
- disable cssCodeSplit in ssr build (457f1f2)
- do not attempt to rewrite css urls that are hash fragments (029de6b)
- ensure env variable replacements are efficient for bundle size (1be6121)
- ensure rewrite middlewares have highest priority (e741628)
- fix entry resolving for packages with explicit exports (c493629), closes #227
- only apply vite-specific global replacements to non-dep code (b96ed68)
- support built-in css preprocess (#220) (bef67f5)
- support loading customize env variables from .env file (#223) (89fe0a9), closes #213
0.16.6 (2020-05-21)
- make sure aliased deps are externaled correctly (#218) (a1f5488)
- redirect url in case index.html is not present (8a9710b)
- respect cssCodeSplit option (4a0b6cc)
0.16.5 (2020-05-21)
0.16.4 (2020-05-20)
- dev: support dev https server (#208) (8b95954)
- css code splitting in async chunks (09879b3), closes #190
0.16.3 (2020-05-20)
- adjust history fallback (ba614ef), closes #193
- fix cross import between optimized modules and avoid duplication (eedc985), closes #210
- fix external url check for protocol-less urls (91f829d)
- html rewrite cache should be based on content (3752874)
- only warn deep imports on js src types (ada8886)
0.16.2 (2020-05-20)
- adjust history fallback (ba614ef), closes #193
- html rewrite cache should be based on content (3752874)
0.16.1 (2020-05-20)
- hmr: should fire self accept callback on hmr propagation (c553de2)
- warn against conditional hot.accept() calls (feb3b6d)
- only perform hmr rewrite if import from client has hot (02e2d94)
0.16.0 (2020-05-19)
- apply user transforms after esbuild (5b75f56)
- fix configureServer option (45fde5b), closes #188
- fix css relative url during dev (e483fc6)
- fix dep optimize cache path when serving nested directory (86e9fb5)
- only append ?import when request has extension (6683bb8)
- build-in dev server proxy support (dafaccb), closes #147
- pass isBuild, path & query to transform functions (ce4032b)
- support arg-less hot.accept() call (ef4fc42)
0.15.6 (2020-05-19)
0.15.5 (2020-05-19)
- more detailed warning for non esm dependencies (0e68cc1)
- support css imports in bundled deps (62a720a)
0.15.4 (2020-05-19)
- ensure vue is actually installed in resolveVue (84cff52)
- fix history fallback redirect for html files (d16f567), closes #160
- fix resolve plugin infinite loop with node-resolve plugin (d1bdf5a)
- force esbuild to output ES2019 (#155) (00f4a83)
- ignore tailwindui for dep optimization (#169) (1f3a9b1), closes #168
- inject dev only script tags directly (89ac245), closes #161
- make style injection sync on component mount (#176) (f6a21b2), closes #175
- hmr: support multiple accept calls (#170) (59da38c), closes #158
0.15.3 (2020-05-14)
- add optimizeDeps option for customizing dep optimization behavior (57c1b66)
0.15.2 (2020-05-14)
- fix non-local vue resolving (39a7640)
0.15.1 (2020-05-14)
- do not warn when postcss config is not present (b03d1c3)
0.15.0 (2020-05-14)
- fix support for non-js module imports (d7fb6a9), closes #132
- forward source file path to esbuild (#141) (b1726d8), closes #137
- log postcss config loading error (close #140) (0819bcb)
- only add ?import when bare import has extension (2dd45af)
- respect exports field in package.json (e49742e)
0.14.4 (2020-05-13)
- fix cva react template build + handle alias during build (c243d09)
- fix windows node resolving (4f2953e)
- support resolving .mjs and other exts in module deep imports (02753b7), closes #127
- history-fallback: properly redirect urls with dot (7f5e459), closes #130
- replace cleanUrl with ctx.path (#133) (f558a88)
- improve module resolving (405f685)
0.14.3 (2020-05-12)
- first request on server start should never 304 (c8a1ffd)
- fix web modules resolve (ce41994)
- make transformed imports work in Safari (b2377bf)
- only register sw if available (2efe9b3)
- should resolve web_modules during rewrite too (b5871eb)
- cva: use @pika/react + alias (f9b267f)
- sw: use lockfile hash (3bb1324)
- service worker caching (ee6a03d)
0.14.2 (2020-05-11)
0.14.1 (2020-05-11)
- stop spinner before logging writes (3d16951)
- cva: update templates (8cd2354)
0.14.0 (2020-05-10)
- do not rewrite external scripts in index.html (fix #116) (06e51cc)
- fix loading ts config (b85de93)
- run all transforms that pass particular
test
(#113) (ed5b9e7) - types: fix hmr hot.on callback type (a4524b4)
- expose base path as BASE (97ae7c3)
- cva: support creating project in cwd (close #111, #112) (02491a4)
- build --ssr (49e79e7)
- expose
rewriteImports
(#104) (d6151bf) - log hmr updates from server (b0713fe)
- resolve plugins + support vueCompilerOptions (7cdaa0b)
- support alias in config (86d550a)
- support config file (ab940fd)
- transforms (87ee998)
- Vue JSX support (efc853f)
- hmr: avoid re-fetching files not in the direct import chain (2ac7469)
- lazy load all compiler-sfc imports (d6dd2f0)
-
JSX support has been adjusted
- Default JSX support is now configured for Vue 3 JSX
jsx
option now accepts string presets ('vue' | 'preact' | 'react') e.g. to Use Preact with Vite, usevite --jsx preact
. In addition, when using the Preact preset, Vite auto injectsh
import in.jsx
and.tsx
files so the user no longer need to import it.
-
in resolvers, idToRequest has been renamed to alias
0.13.2 (2020-05-09)
- --open throwing error (#105) (6ee0168)
- handle lowercase doctypes (close #107) (32cf37f)
- single quote 'src' attribute for <script> (#106) (9336dac)
- cva: fix package.json files include for template-* (#100) (122851e)
0.13.1 (2020-05-09)
- hmr: fix hot.accept() module resolution (#97) (7ffa9c0)
- fix snowpack common chunk resolving + warn jsx in non jsx files (3653793), closes #94
0.13.0 (2020-05-08)
- hmr: change hmr API path to
vite/hmr
and provide typing (eab49a4), closes #92 - cli help message (a882aa4)
- hmr: support hot.dispose (e5cf447)
- support --debug flag from cli (12a5d47)
- support asset path import from js + special treatment of /public dir (9061e44)
- HMR API import path has changed from
@hmr
tovite/hmr
so that it can enjoy type support.
0.12.0 (2020-05-07)
- fix index resolving double append (4c5a31e)
- fix vue resolving without local install (29099ae)
- only bust vue cache on non-vue file change if it is a src import (cd8794c)
0.11.5 (2020-05-07)
0.11.4 (2020-05-07)
- avoid spinner in tests (19f8358)
- fix resolve path on windows (#73) (9f6f0a6)
- fix windows path resolution (82414b8), closes #69 #72
- support directory index resolving (close #74) (904266b)
- use esm-bundler build of vue (5741b79), closes #71
- create-vite-app: use valid html file (#76) (f3265c1)
- improve sfc compilation error output (44a8250)
- src import support (ffd1fee)
- support build sourcemap (6b63b34)
0.11.3 (2020-05-07)
- improve build error output (b1d6be7)
0.11.2 (2020-05-07)
- avoid mutating esbuild options (bd58858)
- fix web_modules resolving for build (fc75323)
- skip asset processing for data uri in css (e01e26d), closes #66
- warn non wrapped hot.accept calls (7aaf458)
- support --open flag (957945f)
0.11.1 (2020-05-06)
- fix rewrite when encountering external url (e78c9f7)
0.11.0 (2020-05-06)
- fix direct index script src hmr (73d94b9)
- dev support for ts (7cbaf5d)
- support minification with esbuild (b87ba7e)
- ts build support for vue files (8262108)
- tsx? support for build (81ffbc5)
0.10.3 (2020-05-05)
- fix module entry redirect on Windows (fix #55) (01135fa)
- only log target exist when error says so (59b8638)
- add asset options into build options (#53) (a5c608d)
- public base path support (c82a597)
- support ssrBuild (4808f41)
- support template pre-processors (b6cafee), closes #17
0.10.2 (2020-05-04)
- fix build index asset injection (ccce482)
- properly handle absolute asset urls (5ca0ec4), closes #45
- moduleResolve: do not rewrite external imports (dd7af0a), closes #42
- support CSS modules for *.module.css (1782f83)
0.10.1 (2020-05-04)
- crash when importing component with no script tag (#46) (586626f)
- should not write assets when buildOptions.write is false (#49) (ef28ee4)
0.10.0 (2020-05-04)
- load custom postcss config (#41) (d271e59)
- support json hmr (634a432)
- support postcss config in js css imports as well (0187d3f)
- support postcss in build (c9ffb45)
- vue source map (c9c9c87)
- lazy load postcss-load-config (1e8b584)
0.9.1 (2020-05-03)
- readBody can return null (a83637e)
0.9.0 (2020-05-03)
- handle
<script src>
in index.html (63b4de6) - handle js css import hmr (538198c)
- handle relative asset paths (5d7ac46)
- resolve css relative urls + base64 inline (f29037d)
- support importing css from js (a3bb973)
- support importing json (97dc7ba)
- support passing --flag=false via cli (3ff579c)
- support string literal dynamic imports (8ef6d4d)
- ws protocol based on location protocol (#31) (9af9ec1)
0.8.1 (2020-04-30)
- fix resolver ensurejs check (3a3442f)
0.8.0 (2020-04-30)
- allow passing rollupPluginVueOptions for build (a0053a0)
- support process.env.NODE_ENV (d4ccd15)
- support self-accepting hmr (30ab444)
0.7.0 (2020-04-29)
- support deep file paths on write (48f2459)
- support
__DEV__
flag - allow adjusting
cssFileName
in build (d9a0798) - allow customizing build via options (1b0b4ba)
- allow plugins to send custom hmr events (a22472d)
- support omitting .js extension (d00523f)
0.6.1 (2020-04-28)
0.6.0 (2020-04-27)
- fix hmr for windows
- only set 304 if etag matches (e0c7354)
- fix resolving scoped packages and relative imports inside
node_modules
(#15) (78ae1b7)
- http caching for vue requests (ecc7219)
0.5.3 (2020-04-26)
0.5.1 (2020-04-24)
0.5.0 (2020-04-24)
- add import analysis cache (868aa21)
- css modules support (fbbdb19)
- support preprocessors in vite build (5a7a4e2)
- vite build (0ea7970)
0.4.0 (2020-04-23)
- hmr propagation (6e66766)
- js hmr API (3e5076d)
- sourcemap handling for deep imports (b100683)
- style lang="x" support (35b23e1)
- support deep module imports (c11cfc8)
- support resolving snowpack web_modules (#4) (a183791)
0.3.2 (2020-04-22)
0.3.1 (2020-04-22)
- do not attempt rewrite on 304 (7b75253)
0.3.0 (2020-04-22)
0.2.0 (2020-04-21)
- support import rewriting in index.html (4ed433a)
0.1.2 (2020-04-21)
- use correct vue & compiler-sfc (0d5a2a4)
- use dependency vue if user has no local installation (bb9baa2)