This repository has been archived by the owner on Aug 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
loader conventions
Tobias Koppers edited this page Jan 20, 2015
·
10 revisions
extension | semantic | loader examples |
---|---|---|
.js |
returns module exports | nothing |
.coffee |
returns module exports |
coffee-loader coffee-redux-loader
|
.jsx |
returns module exports (react component) |
jsx-loader react-hot-loader!jsx-loader
|
.json .json5
|
returns json value |
json-loader json5-loader
|
.txt |
return string value | raw-loader |
.css |
returns nothing, side effect of adding style to DOM |
style-loader!css-loader style-loader!css-loader!autoprefixer-loader
|
.less |
returns nothing, side effect of adding style to DOM | style-loader!css-loader!less-loader |
.scss |
returns nothing, side effect of adding style to DOM | style-loader!css-loader!scss-loader |
.styl |
returns nothing, side effect of adding style to DOM | style-loader!css-loader!stylus-loader |
.png .jpg .jpeg .gif .svg
|
returns url to image |
file-loader url-loader
|
.woff .ttf
|
returns url to font |
file-loader url-loader
|
.wav .mp3
|
returns url to audio |
file-loader url-loader
|
.mpeg .mp4 .webm .ogv
|
returns url to video | file-loader |
.html |
returns HTML as string | html-loader |
.md .markdown
|
returns HTML as string | html-loader!markdown-loader |
.jade |
returns template function | jade-loader |
.hbs .handlebars
|
returns template function | handlebars-loader |
webpack 👍