0.0.0 • Published 5 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.module
include 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 moremodule
orpackage
.
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 module
toamd
format - transform all
style module
tocss
format - transform all
asset module
toinline
orexternal
format
- transform all
- create dependency map: any
module
may 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
5 years ago