Closed wangwb closed 7 years ago
If you want to use the CDN version of jQuery then you should remove const $ = require('jquery')
since that will cause it to be bundled and you will have to use the browser.json
to include jQuery. Something like the following:
{
"dependencies": [
{ "type": "js", "url": "https://code.jquery.com/jquery-3.2.0.slim.min.js" }
]
}
And just to be clear if you use require('jquery')
then you don't need a browser.json
. The browser.json
is only for including vanilla JS libraries (i.e., not CommonJS modules).
I don't want to use any global dependencies, that's not the way node module should work. And I also want to replace the disk dependency with a CDN version. That's what I'm looking for. I can see in webpack
, there is a way to mark a dependency as an external dependency and then the bundler won't bundle that for you. Is there a similar way in lasso
too? Thanks a lot!
Any thoughts?
Is it possible to use the CDN version of
jquery
without changingcomponent.js
?