Closed dhoomm closed 8 years ago
How about webpack shimming? Did you give it a try?
import 'angular-ui-sortable';
angular
.module( 'whatever', [
// ...
'ui.sortable',
// ...
@SpencerCarstens I guess that the above solves the issue when using npm. I'm I right? Are you using any extra webpack config or plugins? Bower probably need some configuration though.
The above example was using npm, correct.
https://webpack.github.io/docs/usage-with-bower.html
angular
.module( 'whatever', [
// ...
require( 'angular-ui-sortable' ),
// ...
That should also work if you are not using Babel...
Thanks for the detailed feedback! This will probably be proven useful for many devs. Closing this for now, feel free to comment or reopen in any case.
Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-sortable/issues/478#issuecomment-234763520, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPF1TywVx-8xVjhaTypcvHCkWDyTcIcks5qYxoNgaJpZM4JSoGk .
Thodoris Greasidis
I installed using bower, but webpack fails to find the module. I had to add an index.js file with contents:
require('./sortable.js'); module.exports = 'ui.sortable';