Skip to content

Restore sortable/Sortable.js #1929

Closed
Closed

Description

@JonathonChen

version 1.12.0
image
version 1.10.2
image

Activity

  1. HopeMa commented on Sep 22, 2020

    @HopeMa

    why?
    There is a problem with the project,now
    Module not found: Error: Cannot resolve module 'sortablejs/Sortable'

  2. yougene commented on Sep 22, 2020

    @yougene

    hey!
    just updated some modules and stumbled about this too.

    I fixed it by adding the import as a module relative to your path:

      <script type="module">
        import Sortable from "/node_modules/sortablejs/modular/sortable.core.esm.js";
    
        window.Sortable = Sortable;
      </script>
    

    Then you can use Sortable.create(whatever.... again.

    Hope this helps!

  3. waynevanson commented on Sep 22, 2020

    @waynevanson
    Contributor

    The change was intended.

    @HopeMa Are you importing sortablejs/Sortable? Import sortablejs instead.

    @yougene did import Sortable from 'sortablejs'not work for you?

  4. bytestream commented on Sep 22, 2020

    @bytestream

    @waynevanson presumably dist/sortable.umd.js is the same as Sortable.min.js in 1.10.2?

    What's the reason for not including an unminified file like before?

  5. yougene commented on Sep 22, 2020

    @yougene

    The change was intended.

    @HopeMa Are you importing sortablejs/Sortable? Import sortablejs instead.

    @yougene did import Sortable from 'sortablejs'not work for you?

    I tried that, but e.g. Firefox gives me:
    Uncaught SyntaxError: import declarations may only appear at top level of a module

    I'm currtently just doing some flat layouting with Bulma, so this was a quick workaround.

  6. UweKeim commented on Sep 22, 2020

    @UweKeim

    Stumbled over this, too.

    Using the node module only to get "sortable.js" into my ASP.NET Core project via gulpfile.js.

  7. UweKeim commented on Sep 22, 2020

    @UweKeim

    The change was intended.

    Can you please tell me, @waynevanson, what the intention was?

    Not being a Nodejs developer, I still love to use npm to pull dependencies into my C# ASP.NET Core project. Your intended change makes life more difficult now.

  8. waynevanson commented on Sep 23, 2020

    @waynevanson
    Contributor

    @bytestream theres no real reason. Do you have a reason for needing it? Files are minified for production, so I don't think it makes much of a difference leaving it out.

    The reasoning behind some of these accidental changes are that were trying to get typescript compiling with tools that we can manage in the future. Before we had no typescript in the code base.

    @UweKeim i didn't realise users would be importing it from sortablejs/Sortable.
    I'll try add it back.

  9. bytestream commented on Sep 23, 2020

    @bytestream

    I was using in gulpjs to concatenate and minify multiple library files.

  10. pomartel commented on Sep 24, 2020

    @pomartel

    Hi @waynevanson ! I'm in the same boat! I use yarn for dependencies management but I'm not using a module bundler to pack my javascript, just Rails with the good old asset pipeline. So for all of us working on "legacy" projects, having a precompiled version of sortable.js is really useful. Would be great if you could add it back or else I'll just stick with version 1.10.2.

  11. changed the title [-]version 1.12.0 remove Sortable.js file[/-] [+]Restore sortable/Sortable.js[/+] on Sep 25, 2020
  12. waynevanson commented on Sep 25, 2020

    @waynevanson
    Contributor

    So for all of us working on "legacy" projects, having a precompiled version of sortable.js

    @pomartel Which file are you after? The non minified version that is sortablejs/Sortable.js?

  13. UweKeim commented on Sep 25, 2020

    @UweKeim

    So for all of us working on "legacy" projects, having a precompiled version of sortable.js

    @pomartel Which file are you after? The non minified version that is sortablejs/Sortable.js?

    Usually both: using the non-minified in debug builds and the minified in release builds.

  14. pomartel commented on Sep 25, 2020

    @pomartel

    @waynevanson The Rails asset pipeline has its own minifier so for my use case the non-minified sortablejs/Sortable.js would be enough. But it could be either one, as long as it doesn't require a module bundler such as Webpack to be usable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions