Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm & webpack #398

Open
laventnc opened this issue Apr 12, 2020 · 0 comments
Open

npm & webpack #398

laventnc opened this issue Apr 12, 2020 · 0 comments

Comments

@laventnc
Copy link

laventnc commented Apr 12, 2020

Can't figure out how to get the npm package to work within a es6 module.

e.g.,

import 'jquery-ui/ui/widget';
import 'selectboxit/src/javascripts/jquery.selectBoxIt';
import 'selectboxit/src/stylesheets/jquery.selectBoxIt.css';

$.widget( 'qubit.selectBox', $.selectBox.selectBoxIt, {

} );

produces 'Cannot read property 'selectBoxIt' of undefined'

I'm also providing the jquery plugin to the module via:

plugins: [
    new webpack.ProvidePlugin( {
        $: 'jquery',
         jQuery: 'jquery',
         //'window.jQuery': 'jquery',
         //'global.jQuery': 'jquery',
         //"window.$": "jquery",
    } ),
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant