You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix first time download
Hi,
With Rollup.js i wasn't able to « import "https://…" » i notice « Url is undefined » (line https://github.com/egoist/import-http/blob/master/lib/rollup.js#L57) when the targeted library isn't in the cache.
Since the URL is also the key its solve the problem.
OS: MacOS
NodeJS Version : 11.13.0
Bundler : RollupJS
Original log :
```sh
$ rollup -c
src/main.js → dist/bundle.js...
Downloading undefined...
[!] Error: Could not load https://cdn.jsdelivr.net/npm/vue/dist/vue.esm.browser.js (imported by /Users/valentinbrosseau/dev/vue-yasb/src/main.js): Only absolute URLs are supported
Error: Could not load https://cdn.jsdelivr.net/npm/vue/dist/vue.esm.browser.js (imported by /Users/valentinbrosseau/dev/vue-yasb/src/main.js): Only absolute URLs are supported
at /usr/local/lib/node_modules/rollup/dist/rollup.js:17855:19
at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:52:5)
at Function.Module.runMain (internal/modules/cjs/loader.js:871:11)
at internal/main/run_main_module.js:21:11
```
* Update http-cache.js
* Use ID instead of url
Since URL is undefined the first time (file not present in cache).
0 commit comments