0.8.3 • Published 1 year ago

svelte-reactive-preprocessor v0.8.3

Weekly downloads
27
License
ISC
Repository
github
Last release
1 year ago

Svelte Reactive Preprocessor

Wrap svelte reactive statements with custom events to allow devtools to detect them

How to install

npm i -D svelte-reactive-preprocessor

How to use

First import the package like this

const { reactivePreprocess } = require("svelte-reactive-preprocessor");

Then in the svelte loader options, add the reactive preprocessor like this

plugins: [
  svelte({
    preprocess: reactivePreprocess(),
  }
],

If you are already using another preprocessor, add the reactive preprocessor like this

preprocess: [
  sveltePreprocess(),
  reactivePreprocess(),
],

Options

The preprocessor options are listed below with their default values

reactivePreprocess({
  enabled: true,
  state: true,
})

enabled: boolean

Enable or disable the preprocessor

state: boolean

Whether to send the state to devtools. Set to false if you encounter performance issues.

0.8.3

1 year ago

0.8.2

2 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.5.3

3 years ago

0.6.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago