Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR hooks #3068

Closed
wants to merge 3 commits into from
Closed

HMR hooks #3068

wants to merge 3 commits into from

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