If Sketch is closed and I run "npm start", it build the plugin and starts Sketch.
The problem is that it shows the plugin window, but the plugin can't work, cause Sketch starts without any "document" instantiated.
So, if you close the plugin window, after 1 second Sketch crashes.
If you leave the plugin window open, and you create a new document in Sketch, the plugin doesn't work (cause when it was initialized there was no "document").
If Sketch is closed and I run "npm start", it build the plugin and starts Sketch. The problem is that it shows the plugin window, but the plugin can't work, cause Sketch starts without any "document" instantiated.
So, if you close the plugin window, after 1 second Sketch crashes. If you leave the plugin window open, and you create a new document in Sketch, the plugin doesn't work (cause when it was initialized there was no "document").