Coder Social home page Coder Social logo

Comments (12)

FeliciousX avatar FeliciousX commented on August 27, 2024 7

can confirm there's a breaking change..

  { test : resolve.require('jquery'), loader : 'expose-loader?jQuery' },
  { test : resolve.require('jquery'), loader : 'expose-loader?$' },

the order matters.. the first one goes through but $ does not.

doing this

{ test: resolve.require('jquery'), loader: 'expose-loader?jQuery!expose-loader?$' }

also doesn't expose $ as jquery .. order matters again.. strange

in version 0.7.1 it works fine for either cases

from expose-loader.

joshwiens avatar joshwiens commented on August 27, 2024 4

@rowanhill @jimbolla - Please pick up 0.7.3 and ping me back if you are still having issues.

Anyone in the thread that has a public project throw up a link, i'm going to write some unit tests for this loader and I'd like to cover as many of your use cases as possible.

from expose-loader.

chenxeed avatar chenxeed commented on August 27, 2024 2

Hi, I upgraded my package to 0.7.3 and it's fixed now, thanks a lot! I'll close this issue now.

from expose-loader.

chenxeed avatar chenxeed commented on August 27, 2024

FYI, this is my webpack config to expose jquery. It's still working on 0.7.1.

  { test : /jquery\.js$/, loader : 'expose-loader?$' },
  { test : /jquery\.js$/, loader : 'expose-loader?jQuery' },

from expose-loader.

Boshen avatar Boshen commented on August 27, 2024

After 7ae08d1

module.exports = global["$"] = require("-!/web/node_modules/expose-loader/index.js?jQuery!/web/node_modules/source-map-loader/index.js!/web/node_modules/jquery/dist/jquery.js");

becomes

module.exports = global["$"] = require("-!./jquery.js");

which breaks the build

from expose-loader.

stephencookdev avatar stephencookdev commented on August 27, 2024

This seems to be the case for all multiple aliases to one library (i.e., does not just affect jQuery)

from expose-loader.

jvmccarthy avatar jvmccarthy commented on August 27, 2024

Yes, I think what's going on here is that the fix in #28 doesn't account for other loaders to be used in sequence. In my case, I have to shim a module with both exports and expose loaders in sequence. I think when the path was changed to relative, the other loader information was stripped off.

from expose-loader.

cletusw avatar cletusw commented on August 27, 2024

This is also affecting my company. Temporarily pinned our build at v0.7.1

from expose-loader.

gdborton avatar gdborton commented on August 27, 2024

Let me know if I can help in any way with the tests. I wanted to add some to the original pr, but I didn't know if my approach was the best.

from expose-loader.

jimbolla avatar jimbolla commented on August 27, 2024

0.7.3 worked for me. Thanks.

from expose-loader.

rowanhill avatar rowanhill commented on August 27, 2024

@d3viant0ne I'm afraid my repo isn't public, but I'm happy to confirm that 0.7.3 has fixed things for me.

Thanks for responding so quickly!

from expose-loader.

joshwiens avatar joshwiens commented on August 27, 2024

Cool & no problem :)

from expose-loader.

Related Issues (20)

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.