ef4 / ember-browserify

ember-cli addon for easily loading CommonJS packages from npm via browserify.
MIT License
172 stars 28 forks source link

Build warnings from broccoli .read/.rebuild API #130

Open gabrielgrant opened 6 years ago

gabrielgrant commented 6 years ago

After installing the default latest ember-browserify (v1.2.2) on a fresh app with ember-cli 3.1.4, building yields the following warnings:

[API] Warning: The .read and .rebuild APIs will stop working in the next Broccoli version
[API] Warning: Use broccoli-plugin instead: https://github.com/broccolijs/broccoli-plugin
[API] Warning: Plugin uses .read/.rebuild API: ember-browserify
[API] Warning: Plugin uses .read/.rebuild API: ember-browserify
ef4 commented 6 years ago

Yeah, it looks like there is some housekeeping to do to get up to date.

Does ember-cli-cjs-transform meet your needs? I suspect that most people who would be adding ember-browserify today are better served by that.

gabrielgrant commented 6 years ago

Ah, interesting, didn't realize browserify was no longer the recommended solution. It looks like ember-cli-cjs-transform should do the trick (though it is still pretty nice how this package allows quickly importing files without any config needed, but having to know how a package was installed in order to use obviously isn't ideal)

ef4 commented 6 years ago

Well I haven't "officially" made any recommendations to not use this yet, but I'm opening the discussion.

I agree that making things Just Work directly from module imports is the goal. The cjs transform is a necessary but not sufficient ingredient. The final step is invoking the cjs transform automatically whenever somebody does import from a module that appears in devDependencies or dependencies.