Giter VIP home page Giter VIP logo

jquery-param's People

Contributors

dependabot[bot] avatar knowledgecode avatar sabberworm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jquery-param's Issues

files moved/removed in 1.2.0

Shouldn't 1.2.0 be a breaking change instead? Since the files all moved and the .min file was removed, this causes all our builds to fail.

1.1.1 no longer has default exports for webpack

I use [email protected] and [email protected]
I am using the following code to import jquery-param

import param from "jquery-param"

However as I updated to 1.1.1 I see this error message for all modules importing jquery-param:
"export 'default' (imported as 'param') was not found in 'jquery-param'

I can see the UMD code (the conditional part for module.export) in both versions are slightly different:
1.0.5:
typeof module === 'object' && typeof module.exports === 'object'
1.1.1:
typeof exports === 'object' && typeof module !== 'undefined'

package.json also now contains a module entry
"module": "esm/jquery-param.es.js"

I am not sure if the usage should be updated or this is an issue of the library

Use same name in global object and node module

I am writing another JavaScript library and want to depend on jquery-param.
But a issue encounter to my project.

I am writing ES6 and use babel to translate my code to use UMD format.
The issue is babel will use only one name for both node module and global object(browser).
ex:

import param from 'param';

will translate to

(function (global, factory) {
  if (typeof define === 'function' && define.amd) {
    define('fetcher', ['exports', 'module', 'param'], factory);
  } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
    factory(exports, module, require('param'));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, mod, global.param);
    global.fetcher = mod.exports;
  }
})(this, function (exports, module, _param2) {

But current jquery-param use jquery-param as node module name, and use param as global object name for browsers. I must have one more post process to deal with this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.