introduce postcss

This commit is contained in:
amphineko 2020-03-21 08:37:28 +08:00
parent 4317a3f9c9
commit 3279a3aec1
No known key found for this signature in database
GPG Key ID: 4582E6587852EF42
3 changed files with 1660 additions and 4 deletions

1648
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,10 +21,13 @@
"@fortawesome/fontawesome-pro": "^5.12.1",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^3.4.2",
"cssnano": "^4.1.10",
"extract-loader": "^3.1.0",
"file-loader": "^3.0.1",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.5.0",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.7.0",
"resolve-url-loader": "^3.1.1",
"style-loader": "^1.1.3",
"unsemantic": "^1.2.3",

View File

@ -32,13 +32,18 @@ module.exports = {
'extract-loader',
{
loader: 'css-loader',
options: { sourceMap: true }
options: {
importLoaders: 1
}
},
{
loader: 'resolve-url-loader',
loader: 'postcss-loader',
options: {
engine: 'postcss',
sourceMap: true
ident: 'postcss',
plugins: () => [
require('cssnano')({ preset: 'default' }),
require('postcss-preset-env')()
]
}
}
],