aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-10-12 22:38:56 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-10-12 22:38:56 +0800
commit3483df9d839671bfd944fdaec6145ef87a54cdec (patch)
tree50788ae9e4e44980c9e401e271b48ce7b4c7bec3 /src
parentadd55547f5c21db12cac47dd3802e6b432d5758d (diff)
chore: add postcss-loader and autoprefixer (#13)
Diffstat (limited to 'src')
-rw-r--r--src/package.json4
-rw-r--r--src/postcss.config.js7
-rw-r--r--src/webpack.config.js27
3 files changed, 19 insertions, 19 deletions
diff --git a/src/package.json b/src/package.json
index de27154..d44cdaa 100644
--- a/src/package.json
+++ b/src/package.json
@@ -9,6 +9,7 @@
"author": "ahonn, olOwOlo",
"license": "MIT",
"devDependencies": {
+ "autoprefixer": "^7.1.5",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
@@ -19,10 +20,11 @@
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"node-sass": "^4.5.3",
+ "postcss-loader": "^2.0.7",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
"uglifyjs-webpack-plugin": "^0.4.6",
"url-loader": "^0.5.9",
- "webpack": "^3.5.5"
+ "webpack": "^3.7.1"
}
}
diff --git a/src/postcss.config.js b/src/postcss.config.js
new file mode 100644
index 0000000..7c5b1be
--- /dev/null
+++ b/src/postcss.config.js
@@ -0,0 +1,7 @@
+module.exports = {
+ plugins: [
+ require('autoprefixer')({
+ browsers: ['> 1%', 'last 2 versions', 'ie >= 9']
+ })
+ ]
+} \ No newline at end of file
diff --git a/src/webpack.config.js b/src/webpack.config.js
index 07517b8..01c91e6 100644
--- a/src/webpack.config.js
+++ b/src/webpack.config.js
@@ -1,10 +1,10 @@
-const path = require('path');
-const ExtractTextPlugin = require("extract-text-webpack-plugin");
+const path = require('path')
+const ExtractTextPlugin = require("extract-text-webpack-plugin")
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const extractSass = new ExtractTextPlugin({
filename: `even.min.css`
-});
+})
module.exports = {
devtool: 'source-map',
@@ -26,31 +26,22 @@ module.exports = {
test: /\.scss$/,
use: extractSass.extract({
use: [{
- loader: 'css-loader',
- options: {
- minimize: true,
- sourceMap: true
- }
+ loader: 'css-loader', options: {minimize: true, sourceMap: true}
}, {
- loader: 'sass-loader',
- options: {
- sourceMap: true
- }
+ loader: 'postcss-loader', options: {sourceMap: true}
+ }, {
+ loader: 'sass-loader', options: {sourceMap: true}
}],
fallback: 'style-loader'
})
},
{
test: /iconfont\.(woff|woff2|eot|ttf|otf|svg)$/,
- use: [
- 'file-loader?name=[path][name].[ext]?hash=[hash:7]'
- ]
+ use: ['file-loader?name=[path][name].[ext]?hash=[hash:7]']
},
{
test: /apple-chancery-webfont\.(woff|woff2|eot|ttf|otf|svg)$/,
- use: [
- 'file-loader?name=[path][name].[ext]'
- ]
+ use: ['file-loader?name=[path][name].[ext]']
}
]
},