Skip to content

npm & webpack #398

@laventnc

Description

@laventnc

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",
    } ),
],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions