loader conventions

extension semantic loader examples
.js returns module exports nothing
.ts returns module exports ts-loader
.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
doc_Webpack
2016-11-24 04:40:17
Comments
Leave a Comment

Please login to continue.