style-url-webpack

2.0.2 • Public • Published

Webpack loader

Style Url

Replace object url to string css

Spoiler Process performed with node-sass and postcss using the plugins autoprefixer and postcss-preset-env

Example

.main {
    color: red;
 
    &.top {
        color: blue;
    }
}
From
{
styleUrl: './index.scss'
}
To
{
styleUrl: `.main{color:red}.main.top{color:blue}`
}

webpack

install: npm i -D style-url-webpack

{
    test: /\.js$/,
    loader:  'style-url-webpack',
    exclude: ['node_modules'],
    include: [path.resolve(__dirname, 'src')]
},

Package Sidebar

Install

npm i style-url-webpack

Weekly Downloads

5

Version

2.0.2

License

MIT

Unpacked Size

6.64 kB

Total Files

8

Last publish

Collaborators

  • devcopie