easylogic / jquery-globals

jquery helper library to using in esm module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jquery-globals

jquery helper library to using in esm module

install

npm install jquery @easylogic/jquery-globals

not woking in webpack

new webpack.ProvidePlugin({
    $: "jquery",
    jQuery: "jquery",
    "window.jQuery": "jquery"
})  
import $ from 'jquery'
window.jQuery = $ 
import 'summernote/dist/lang/summernote-ko-KR'; 

This is because the import statement is executed before the actual statement.

So build result is below code

import $ from 'jquery'
import 'summernote/dist/lang/summernote-ko-KR';   // not working 
window.jQuery = $ 

Use jquery-globals

You don't need webpack.ProviderPlugin anymore.

import '@easylogic/jquery-globals'
import 'summernote/dist/lang/summernote-ko-KR'; 

About

jquery helper library to using in esm module

License:MIT License


Languages

Language:JavaScript 100.0%