Imports source code URLs! Like
<script type="module">and Deno but implemented in webpack. Embracing the future :)console
Remote code is fetched and cached on first build, and never updated until you use the
reloadoption. See more about Caching.
node_modulesbloat, no dependency to install.
yarn add import-http --dev
const ImportHttpWebpackPlugin =moduleexports =plugins:
That's it, try following code:
Run webpack and it just works.
Resources will be fetched at the very first build, then the response will be cached in
~/.cache/import-http dir. You can use the
reload option to invalidate cache:
const ImportHttpWebpackPlugin =moduleexports =plugins:reload: processenvRELOAD
RELOAD=true webpack to update cache.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D