style-by-convention-loader
v0.1.1
Published
Webpack loader to add an style file with the same filename of the js file
Downloads
2
Readme
style-by-convention loader
Working with react and webpack usually you encounter the scenario where you import style.scss
on your js|jsx files and a little tired of that waste I found how glimmerJS does that based on a convention, so this is a very easy work-around-like to keep the same pattern; Now imagine that you have a folder with a /foo.js
file, than, /foo.scss
will be automatically imported to your webpack flow, is up to you the way you want to process the styles.
Install
npm install -D style-by-convention-loader
Usage
// loader e.g.
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
use: [
{
loader: 'babel-loader',
...
},
'style-by-convention-loader',
],
},
],
},