Open fractaledmind opened 8 years ago
Hey @smargh, browserfiy support is on my todo list :)
I have the same problem? Do you have any idea to fix that?
@phuclh I am working on a new version of components, so I will let you know as soon as it is ready. I should have it done by the end of this month.
@kzima Thank you :D
Man, this would be nice. Laravel's Elixir uses Browserify, and I'd really like to be able to use this with some Laravel projects without having to call in Webpack. Very nice stuff, regardless of that, though.
Even with laravel elixir, webpack and babel-loader, I'm not able to use gritcode-components ($export is not a function
)...
The perfect solution (for us, at least) would be to use the same distribution system as Vue-strap : CommonJS, ES6 and AMD
Because gritcode-components is based on vue-strap, that would allow us to use the same workflow as we used with vue-strap.
I could load it as
const vsFileUpload = require('gritcode-components/dist/gritcode-components').fileUpload;
to avoid the error
Browserify Failed!: 'import' and 'export' may appear only with 'sourceType: module'
This library currently only works with Webpack and not Browserify. Would it be possible to add support for Browserify?
FWIW, I get this error when I try to include a component like so
import toast from 'gritcode-components/src/components/toast
This error is due to the library's
package.json
not containing a "browserify" command.For comparison, this is the VueStrap
package.json
, which does have browserify support: https://github.com/yuche/vue-strap/blob/master/package.json