0.0.0 • Published 7 years ago
webpack-amd-plugin v0.0.0
webpack-amd-plugin
A webpack plugin to emit amd module for each entry file.
Concepts
module: A single source file is calledmodule, for example:src/foo.js,src/bar.ts,src/image.svg, etc.moduleinclude three kind:script: the module will be executed as scriptstyle: the module will be executed as styleasset: the module will be treated as external resource, and include two form:inline: which will be convert to data urlexternal: which will be emitted
package: A directory contains one or moremoduleorpackage.
Design
Basic: Transform all specified module to amd module, and emit each of it to a separate file.
What need to do:
- transform
- transform all
script moduletoamdformat - transform all
style moduletocssformat - transform all
asset moduletoinlineorexternalformat
- transform all
- create dependency map: any
modulemay dependent on one or more othermodule - create id <-> file map: we must use hash to let cache system works
- implement
amd loader&webpack runtime.
LICENSE
0.0.0
7 years ago