0
votes

I try to implement slatejs package to my react app for creacting my custom editor,it works great,but hot-reloading stops working. it stops when I do import into some component.I use webpack-dev-server+react-hot-loader

Firstly I supposed that the reason was my custom app settings ,but it didn't work for https://github.com/facebookincubator/create-react-app and for https://github.com/davezuko/react-redux-starter-kit too

As I can understand slatejs package uses browserify,maybe this is the reason,but it shouldn't have an effect cause it's just a package and webpack settings for react-hot-loader exclude node_modules

Thank you!

1

1 Answers

0
votes

I solved this issue,I don't know why but it helped.

const { Editor, Raw }  = require('slate') // this import works with live-reload

import { Editor, Raw } from 'slate' // this import doesn't work with live-reload