Skip to content

Error in browser #7

Open
Open

Description

@mila76

I use bs5-utils with the dist/js in a script tag

With the last version i have some problem with other library...
this error popup loading a library after bs5-utils: module is not defined

With the previous version no problem. I can also fix this error putting bs5 tag last

Activity

  1. Script47 commented on Jan 16, 2022

    @Script47
    Owner

    @mila76

    Can you please provide a reproduciable example because I've got it working without any issues here using the latest version: https://jsfiddle.net/cr0dez8q/

  2. added
    bugSomething isn't working
    wontfixThis will not be worked on
    and removed
    bugSomething isn't working
    wontfixThis will not be worked on
    on Jan 16, 2022
  3. mila76 commented on Jan 16, 2022

    @mila76
    Author

    https://jsfiddle.net/o37kyac2/

    pasted another library (tingle js)
    You can see the error in browser console

    I think the problem is exports = {} in your library (webpack doing i assume)

  4. nirvana-msu commented on Jul 5, 2022

    @nirvana-msu

    Same issue when mixing this e.g. with nprogress.

    It is fairly common to see code like this:

      if (typeof define === 'function' && define.amd) {
        define(factory);
      } else if (typeof exports === 'object') {
        module.exports = factory();
      } else {
        root.NProgress = factory();
      }
    

    The presense of exports object, unfortunately, confuses it.

    In this instance I could just reverse the order in which scripts are loaded, but regardless, cluttering the global exports var is definitely not a good thing.

  5. btraas commented on Nov 4, 2022

    @btraas

    Same issue when including dist/js in a script tag along with with Pace.js
    CodeByZach/pace#541

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions