Skip to content

Latest commit

 

History

History
557 lines (297 loc) · 22.4 KB

File metadata and controls

557 lines (297 loc) · 22.4 KB

@sveltejs/vite-plugin-svelte

1.0.5

Patch Changes

  • removed peerDependency for vite 3.1.0-beta as vite 3.1.0 final has been released (#431)

1.0.4

Patch Changes

  • temporarily add vite 3.1 beta to peer dependencies rule to avoid warning on kit projects using it (#427)

    warning: this is going to be changed back to ^3.0.0 in a future patch

1.0.3

Patch Changes

  • ignore keyup events without key in inspector (#417)
  • fix svelte-inspector import for vite 3.1 (#423)

1.0.2

Patch Changes

  • update svelte-inspector inject code to be compatible with @sveltejs/kit > 1.0.0-next.405 (#411)

1.0.1

Major Changes

  • update to vite3 (#359)
  • bump minimum required node version to 14.18.0 to align with vite 3 (#359)
  • move plugin options in svelte.config.js into "vitePlugin" (#389)

    update your svelte.config.js and wrap plugin options with vitePlugin

    // svelte.config.js
    
      compilerOptions: {...},
      preprocess: {...},
      extensions: [...],
      onwarn: () => {...},
      kit: {},
    + vitePlugin: {
       // include, exclude, emitCss, hot, ignorePluginPreprocessors, disableDependencyReinclusion, experimental
    + }

Patch Changes

  • Always add dependencies using svelte to ssr.noExternal in vite config (#359)

1.0.0-next.49

Minor Changes

  • New experimental option sendWarningsToBrowser (#372)

Patch Changes

  • fix hmr not updating a component when returning to the last working state from an error state (#371)

1.0.0-next.48

Minor Changes

  • Automate setting of compilerOptions.hydratable from kit.browser.hydrate option (#368)

Patch Changes

  • Do not try to resolve svelte field in __vite-browser-external, see (#362)" (#363)

1.0.0-next.47

Patch Changes

  • Use last modified time as cache busting parameter (#356)
  • Export loadSvelteConfig (#356)

1.0.0-next.46

Patch Changes

  • Bump svelte-hmr version (#349)

1.0.0-next.45

Patch Changes

  • Handle inspector autocomplete keydown event (#338)
  • Remove user-specified values for essential compilerOptions generate, format, cssHash and filename and log a warning (#346)
  • fix inspector not initializing correctly for sveltekit on windows (see #342) (#344)

1.0.0-next.44

Patch Changes

  • correctly resolve the experimental svelte inspector (see #332) (fixes #330) (#333)

1.0.0-next.43

Minor Changes

  • Add experimental Svelte Inspector to quickly jump to code from your browser. (#322)

Patch Changes

  • use deepmerge utility to merge inline config and svelte.config.js (#322)
  • do not warn if kit options are passed as inline config (#319)
  • Support import typescript files with .js extension (#324)
  • do not restart vite devserver on changes of svelte config when configFile: false is set (#319)

1.0.0-next.42

Minor Changes

  • skip reading default svelte config file with inline option configFile: false (#317)

1.0.0-next.41

Major Changes

  • Update vite peerDependency to ^2.9.0 and handle edge cases for experimental.prebundleSvelteLibraries (#294)

Patch Changes

  • Improved CSS Source Maps when using vite's css: { devSourcemap: true } (#305)

1.0.0-next.40

Patch Changes

  • improve handling of transitive cjs dependencies of svelte libraries during dev ssr (#289)

1.0.0-next.39

Patch Changes

  • prevent errors in resolveViaPackageJsonSvelte breaking vite resolve (fixes #283) (#286)

1.0.0-next.38

Patch Changes

  • don't warn if dependency doesn't export package.json (#272)
  • Optimize nested index-only dependencies (#282)
  • Remove transforming svelte css (#280)

1.0.0-next.37

Patch Changes

  • don't try to resolve node internal modules via package.json svelte field (#266)

1.0.0-next.36

Patch Changes

  • include stack and filename in error reporting for svelte preprocess errors (#260)

1.0.0-next.35

Patch Changes

  • do not use require-relative to resolve svelte field of libraries and cache resolved values (fixes #244) (#254)

1.0.0-next.34

Minor Changes

  • Automatically re-prebundle when Svelte config changed for experimental.prebundleSvelteLibraries (#245)

Patch Changes

  • use the resolved vite root to support backend integrations (#247)
  • fix experimental.useVitePreprocess option for Vite 2.8 (#240)

1.0.0-next.33

Minor Changes

  • auto-restart SvelteKit when Svelte config changed (#237)
  • handle preprocess for prebundleSvelteLibraries (#229)

Patch Changes

  • Skip prebundle non-js nested dependencies (#234)
  • handle production builds for non "production" mode (#229)

1.0.0-next.32

Major Changes

  • update vite peerDependency to ^2.7.0 and refactor server restart on change of svelte.config.js (#223)

Patch Changes

  • Ignore import protocols like node: when resolving the svelte field in package.json (#225)

1.0.0-next.31

Minor Changes

  • Improved error reporting for svelte compiler errors (#220)

1.0.0-next.30

Major Changes

  • Bump svelte peer dependency to ^3.44.0 (#202)

1.0.0-next.29

Major Changes

  • drop support for node12 (#198)

Minor Changes

  • Add experimental.prebundleSvelteLibraries option (#200)

Patch Changes

  • Disable CSS sourcemap in SSR (#201)

1.0.0-next.28

Patch Changes

  • Fix emitCss behaviour in a svelte config (#194)

1.0.0-next.27

Minor Changes

  • Run Vite preprocessors first in markup phase (#189)

Patch Changes

  • Handle flexible ssr signature for hooks with ssr argument (#187)

1.0.0-next.26

Major Changes

  • minimum required version of vite is 2.6.0 (#182)

1.0.0-next.25

Minor Changes

  • Use transformWithEsbuild for vite script preprocessor (#173)

1.0.0-next.24

Patch Changes

  • Only add all Svelte dependencies to ssr.noExternal in SSR build (#169)

1.0.0-next.23

Patch Changes

  • Svelte libraries without any Svelte components are also added to ssr.noExternal (#166)

1.0.0-next.22

Patch Changes

  • Only optimize nested cjs dependencies (#163)

1.0.0-next.21

Minor Changes

  • Add option disableDependencyReinclusion to offer users a way out of automatic optimization for hybrid packages (#161)

Patch Changes

  • Improve automatic dependency pre-bundling by not reincluding dependencies that are already present in optimizeDeps.exclude (#159)

1.0.0-next.20

Major Changes

  • Enable optimization for nested dependencies of excluded svelte dependencies (#157)

    Vite 2.5.3 and above is needed to support this feature.

Minor Changes

  • Improve dev warning message for components including only unscoped styles (fixes #153) (#154)

1.0.0-next.19

Patch Changes

  • add automatically excluded svelte dependencies to ssr.noExternal (#147)

1.0.0-next.18

Minor Changes

  • automatically exclude svelte dependencies in vite.optimizeDeps (#145)

Patch Changes

  • use createRequire to load svelte.config.cjs in esm projects (fixes #141) (#142)

1.0.0-next.17

Patch Changes

  • don't add svelte/ssr to vite.optimizeDeps.include (fixes #138) (#139)

1.0.0-next.16

Major Changes

  • automatically include svelte in vite config optimizeDeps.include (#137)

    Previously, svelte was automatically excluded. We include it now by default to improve deduplication.

    As a result, svelte is pre-bundled by vite during dev, which it logs when starting the devserver

    Pre-bundling dependencies:
      svelte/animate
      svelte/easing
      svelte/internal
      svelte/motion
      svelte/store
      (...and 2 more)
    (this will be run only when your dependencies or config have changed)

    And it's also visible in the browsers network tab, where requests for svelte imports now start with node_modules/.vite/ during dev.

    Check out the vite pre-bundling documentation for more information.

    To get the old behavior back, add the following to your vite config

    optimizeDeps: {
    	exclude: ['svelte'];
    }

Patch Changes

  • prepare for a change in vite 2.5.0 that would lead to errors in preprocessor dependency handling (fixes #130) (#131)

1.0.0-next.15

Major Changes

  • change default value of compilerOptions.hydratable to false (#122)

    This is done to align with svelte compiler defaults and improve output in non-ssr scenarios.

    Add {compilerOptions: {hydratable: true}} to vite-plugin-svelte config if you need hydration (eg. for ssr)

Minor Changes

  • add config option experimental.dynamicCompileOptions for finegrained control over compileOptions (#122)

Patch Changes

  • resolve vite.root option correctly (fixes #113) (#115)

1.0.0-next.14

Patch Changes

  • replace querystring with URLSearchParams (#107)
  • import svelte types instead of duplicating them (#105)
  • update svelte-hmr to 0.14.7 to fix issue with svelte 3.40 (#112)
  • turn diff-match-patch into an optional peer dependency to reduce footprint (#110)

1.0.0-next.13

Minor Changes

  • Add experimental section to options and move useVitePreprocess there (#99)

    Experimental options are not ready for production use and breaking changes to them can occur in any release

    If you already had useVitePreprocess enabled, update you config:

    - svelte({useVitePreprocess: true})
    + svelte({experimental: {useVitePreprocess: true}})
  • Add option to ignore svelte preprocessors of other vite plugins (#98)

    • ignore them all: ignorePluginPreprocessors: true
    • ignore by name: ignorePluginPreprocessors: ['<name of plugin>',...]
  • Move plugin preprocessor definition to api namespace (#98)

    Plugins that provide myplugin.sveltePreprocess, should move it to myplugin.api.sveltePreprocess, as suggested by rollup

  • Experimental: Generate sourcemaps for preprocessors that lack them (#101)

    enable option experimental.generateMissingPreprocessorSourcemaps to use it

Patch Changes

  • removed redundant disableCssHmr option (#99)

    You can use emitCss: false or emitCss: !!isProduction instead

  • further improvements to changelog (see #93) (#94)
  • reduce log output with log.once function to filter repetetive messages (#101)
  • remove transitive peer dependency on rollup (fixes #57) (#103)

1.0.0-next.12

Minor Changes

  • Resolve svelte to svelte/ssr when building for ssr (fixes #74) (#75) (f6f56fe)

  • Support svg extension (#78) (2eb09cf)

  • Restart dev server when svelte config file changes (#72) (5100376)

  • Allow svelte imports to be added to optimizeDeps.include and don't exclude svelte from optimizeDeps then (#68) (9583900)

  • Vite config can be updated based on values in svelte config (see #60) (#64) (c3f65fd)

Patch Changes

  • customize changelog format (#90) (b5a58cd)

  • relax svelte peer dependency to 3.34.0 (#70) (377d464)

  • do not transform imports tagged with ?url or ?raw (fixes #87) (#88) (d1d2638)

  • update svelte-hmr to ^0.14.5 to fix hmr reordering issue introduced by a change in svelte 3.38.3 (#92) (cdfd821)

  • fix kit-node tests (#55) (09b63d3)

  • output sourcemap in hmr helper preprocessor (#71) (97ee68c)

  • reduced debug output (#83) (eb048ff)

  • Refactored e2e-tests to use package.json scripts

  • Updated dependencies

1.0.0-next.11

Major Changes

  • convert to es module with cjs fallback, use named export instead of default (#54) (0f7e256)

    If you are using vite-plugin-svelte with require, you should switch to esm and import the named export "svelte". An example can be found in the usage section of the readme

    For existing esm configs update your import to use the new named export.

    - import svelte from '@sveltejs/vite-plugin-svelte';
    + import { svelte } from '@sveltejs/vite-plugin-svelte';

    continuing with cjs/require is discouraged but if you must use it, update your require statement to use the named export

    - const svelte = require('@sveltejs/vite-plugin-svelte');
    + const { svelte } = require('@sveltejs/vite-plugin-svelte');

Minor Changes

  • Log svelte compiler warnings to console. use options.onwarn to customize logging (#45) (673cf61)

Patch Changes

  • Update to esbuild 0.12 and vite 2.3.7 (#44) (24ae093)

  • Update engines.node to "^12.20 || ^14.13.1 || >= 16" (#44) (24ae093)

  • Enable logging for compiler warnings (#45) (673cf61)

1.0.0-next.10

Minor Changes

  • Allow emitCss: false for production builds and customizable compilerOptions.css and hydratable (fixes #9) (#41) (cb7f03d)

1.0.0-next.9

Patch Changes

  • Ensure esm config loading works on windows (#38) (5aef91c)

1.0.0-next.8

Minor Changes

  • Support esm in svelte.config.js and svelte.config.mjs (#35) (4018ce6)

  • Add configFile option (#35) (4018ce6)

Patch Changes

  • Watch preprocessor dependencies and trigger hmr on change (#34) (e5d4749)

1.0.0-next.7

Minor Changes

  • Reduced cache usage, share css cache between SSR and client (#32) (113bb7d)

1.0.0-next.6

Minor Changes

  • 1be46f1: improved css hmr
  • a0f5a65: Allow other vite plugins to define preprocessors

Patch Changes

  • 8d9ef96: fix: do not preserve types unless useVitePreprocess option is true
  • 6f4a253: disable svelte-hmr overlay by default
  • 18647aa: improve virtual css module path (fixes #14)

1.0.0-next.5

Patch Changes

  • 61439ae: initial release