You could potentially do this, but you'd need to have a very good separation of your widget code from code that could run independently. Even then, you wouldn't be able to fully test your widget since the parts that depend on the Thingworx runtime won't run outside of it - just the parts that don't directly depend on Thingworx.
Alternatively, you could consider using a build script such as the one used by this widget which contains a task that increments the extension version, creates the zip package and uploads the extension to Thingworx. This way you could just assign that task to a build shortcut (e.g. ctrl+b) and use it to quickly deploy your changes to the Thingworx server for testing. Additionally this would let you use a different javascript ide if you prefer, such as visual studio code.
Another option, though more complex, would be to use a template such as demo webpack widget that has a series of tasks predefined but is a completely different way of building widgets that is not supported by PTC.