Skip to content

Conversation

@Axelen123
Copy link
Contributor

@Axelen123 Axelen123 commented Jun 21, 2019

This PR adds hooks needed for HMR support and should fix #2377. $capture_state() still returns bindings and handlers but injecting the state still works. I haven't made any tests for the new functions but I have modified the expected result of some existing tests. Here is a Webpack Demo.

If in the demo you get an error like:

ERROR in ./src/App.svelte
Module build failed (from ./node_modules/svelte-loader/index.js):
Error: Cannot find module 'css-tree/lib/parser/index.js'

Then you should run:

git clone "https://github.com/Axelen123/svelte.git#hmr-hooks"
cd svelte
npm install
npm link
cd ..
npm link svelte

@Axelen123
Copy link
Contributor Author

This PR is broken. I will create a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hooks for granular HMR support

1 participant