Created
July 25, 2019 09:38
-
-
Save lysenko-sergey-developer/ffe8296582855afd3284dd71a5b3169b to your computer and use it in GitHub Desktop.
webpack configs(+postcss) without postcss.configs.js file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = async ({ config, mode }) => { | |
config.module.rules.push({ | |
test: /\.scss$/, | |
use: ['style-loader', 'css-loader', { | |
loader: 'postcss-loader', options: { | |
ident: 'postcss', | |
plugins: (loader) => [ | |
require('postcss-import')({ root: loader.resourcePath }), | |
require('postcss-preset-env')(), | |
require('postcss-nested')(), | |
require('rucksack-css')(), | |
require('lost')() | |
] | |
}}], | |
include: path.resolve(__dirname, '../'), | |
}); | |
return config; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment