Coder Social home page Coder Social logo

webpack 4 about expose-loader HOT 12 CLOSED

webpack-contrib avatar webpack-contrib commented on July 24, 2024 3
webpack 4

from expose-loader.

Comments (12)

eerrecalde avatar eerrecalde commented on July 24, 2024 7

Still happening to me :/

webpack: 4.19.1
expose-loader: 0.75

This (in my entry file) works fine:

import "expose-loader?$!jquery";
import "expose-loader?jQuery!jquery";

With this (in my webpack.config) doesn't work:
{ test: require.resolve('jquery'), use: [ { loader: 'expose-loader', options: 'jQuery' }, { loader: 'expose-loader', options: '$' } ] }

from expose-loader.

nass600 avatar nass600 commented on July 24, 2024 5

Looks like this is still happening.

webpack: 4.6.0
expose-loader: 0.7.5

from expose-loader.

basilikum avatar basilikum commented on July 24, 2024 3

For me [email protected] stopped working when updating to [email protected]. I could not see an error message but it failed to bind jquery to window, using the following configuration:

{
    test: require.resolve('jquery'),
    use: [{
        loader: 'expose-loader',
        options: 'jQuery'
    },{
        loader: 'expose-loader',
        options: '$'
    }]
}

The most recent version (0.7.4) however seems to work fine.

from expose-loader.

michael-ciniawsky avatar michael-ciniawsky commented on July 24, 2024 2

Released in v0.7.5 🎉

from expose-loader.

zapo avatar zapo commented on July 24, 2024 1

Works fine as well for us in development.

But for some reason tests (ran with karma & karma-webpack) seems to no longer have access to exposed modules when using webpack 4. I'm running them in "development" mode with no automagic vendor chunk splitting. Not sure if expose-loader concern or not.

  Uncaught ReferenceError: jQuery is not defined

from expose-loader.

michael-ciniawsky avatar michael-ciniawsky commented on July 24, 2024

@719media Besides the peerDependency warning, did you use expose-loader with webpack >= v4.0.0? Could you confirm nothing broke ? I will patch the package then :)

from expose-loader.

craig-jennings avatar craig-jennings commented on July 24, 2024

Nothing broke in my project when I upgraded to [email protected]. Just got the warning.

from expose-loader.

michael-ciniawsky avatar michael-ciniawsky commented on July 24, 2024

Waiting for #61 and patch asap

from expose-loader.

Trainmaster avatar Trainmaster commented on July 24, 2024

@zapo Did you find a solution for the failing tests running with karma & karma-webpack?

from expose-loader.

zapo avatar zapo commented on July 24, 2024

@Trainmaster It's working properly now after updating everything. I'm not too sure what fixed it to be honest.

from expose-loader.

eerrecalde avatar eerrecalde commented on July 24, 2024

Any update about this @michael-ciniawsky?

from expose-loader.

DaleyKD avatar DaleyKD commented on July 24, 2024

Any update on this? I'm on webpack 4.41.2 and expose-loader 0.7.5.

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.