Whats the difference b/w "loader" and "loaders" inside "loaders" object?
See original GitHub issueWhen I am using React-Hot-loader, I see syntax like “loaders” that takes an array of loaders like react-hot and babel. But for css, the loader is spelled “loader” and the value is a string where we pipe results of css-loader to style-loader. What’s the difference? @sokra @gaearon
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['react-hot', 'babel'],
},
{
test: /\.css$/,
loader: 'style!css'
}
]
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Loaders - webpack
Loaders are transformations that are applied to the source code of a module. They allow you to pre-process files as you import or...
Read more >Difference between Linker and Loader - GeeksforGeeks
Loaders are of 4 types: Absolute, Relocating, Direct Linking, Bootstrap. Another use of linker is to combine all object modules. It helps in ......
Read more >Rules vs Loaders in Webpack - What's the Difference?
Loaders are used in Webpack 1. Rules are used in Webpack 2 +. According to the migrating docs at the official Webpack site....
Read more >Loaders | Android Developers
Loader, Loaders perform the loading of data. This class is abstract and serves as the base class for all loaders. You can directly...
Read more >Webpack Loaders, CSS and Style Loaders | by Bharat Tiwari
css-loader is the npm module that would help webpack to collect CSS from all the css files referenced in your application and put...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since webpack 2 there is no difference.
In webpack 1,
loaders
takes an array,loader
takes a string.Great! Thanks for the explanation!