edemaine / solid-meteor-data

Integrating SolidJS and Meteor reactivity
MIT License
16 stars 2 forks source link

SolidJS development mode #3

Closed edemaine closed 2 years ago

edemaine commented 2 years ago

SolidJS conditionally exports extra debugging code when the "development" flag is set. Ideally we could enable that whenever Meteor.isDevelopment is true. This is an upsteam Meteor issue.

Alternatively, this package could potentially require('solid-js/dist/dev.js') or require('solid-js/dist/solid.js') or require('solid-js/dist/server.js') according to whether Meteor.isDevelopment, Meteor.isClient, or Meteor.isServer is set, and export that as an alternative source of solid-js (maybe as solidjs-meteor-data/solid-js).

Another option is for edemaine:solid to install a Babel plugin for rewriting import ... 'solid' / require('solid') to the appropriate submodule. babel-plugin-rewrite-require and babel-plugin-module-name-mapper look they would do the trick.

Thinking more, none of the solutions above will work, because any NPM library depending on solid-js will use the wrong library. So I think this can only get fixed upstream.

edemaine commented 2 years ago

Moving to https://github.com/edemaine/meteor-solid/issues/4