jordwalke / one-click.js

One Click, Offline, CommonJS Modules in the browser
MIT License
335 stars 9 forks source link

【Suggest】node_modules fallback to unpkg #1

Open YikaJ opened 4 years ago

YikaJ commented 4 years ago

There are npm modules in unpkg which can be fetched by ajax. Maybe when oneClick can't find target module in /node_modules/, it can try to get it in unpkg.

For example, try to require('react') https://unpkg.com/react

jordwalke commented 4 years ago

It is not possible to fetch modules asynchronously when running from the local file system. Is this what you meant?