library-loader

1.10.4 • Public • Published

npm node

lib Loader

Instructs webpack to emit the required object as lib and to return its public URL

Install

npm install --save-dev lib-loader

By default the libname of the resulting lib is the MD5 hash of the lib's contents with the original extension of the required resource.

import myLibUrl from 'lib-loader?myLib!./lib.js'

html

<script src="${myLibUrl}"></script>
<script>
  myLib.doSomeThing();
</script>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.10.4
    1
    • latest

Version History

Package Sidebar

Install

npm i library-loader

Weekly Downloads

1

Version

1.10.4

License

MIT

Unpacked Size

13.7 kB

Total Files

6

Last publish

Collaborators

  • goayuan