javascript - How do I include jQuery in a project with babel, Node.js, and webpack? -


looking @ jquery documentation on npm, i'm confused have use it. know can include script tag in index.html use it, how else work?

if choose not use script tag, understand can install node , import babel file want use jquery in. webpack come play? have use webpack's require if i'm not using babel, correct? webpack's require alternative babel's import?

it seems either can use babel , node.js or webpack , node.js? thought babel , wepback serves separate purposes though, babel trans-compiling ecmascript 6 ecmascript 5 , webpack bundling files one. if i'm using webpack, babel, , node.js. best way include , use jquery?

if plan on working anywhere without internet connection, go ahead , npm install minified version of jquery modules.

otherwise, use cdn in html file easy global jquery access. doesn't make difference how include in project in terms of webpack/babel methods; sure stay consistent how import them. difference require ecmascript 5 , import ecmascript 6.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -