aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-09-06 01:13:02 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-09-06 01:13:02 +0800
commit6a66b73a437ff4f5e450da2cf15a92e502bcd44a (patch)
tree4aeba4083570420f26f7957a863c845dc8c6f118 /src
parent6c4998a1089bb16bf472359ab3f476c068fdca0a (diff)
refactor: move theme version param to template
delete version param in config.toml even.[version].css => even.min.css?v=[version] even.[version].js => even.min.js?v=[version] It's more convenient for users to update this theme.
Diffstat (limited to 'src')
-rw-r--r--src/webpack.config.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/webpack.config.js b/src/webpack.config.js
index 5132b33..6dc5c0e 100644
--- a/src/webpack.config.js
+++ b/src/webpack.config.js
@@ -2,11 +2,8 @@ const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
-// theme version
-const version = 'v2.5.0'
-
const extractSass = new ExtractTextPlugin({
- filename: `even.${version}.css`
+ filename: `even.min.css`
});
module.exports = {
@@ -16,7 +13,7 @@ module.exports = {
},
output: {
path: path.join(__dirname, '../static/dist'),
- filename: `[name].${version}.js`
+ filename: `[name].min.js`
},
module: {
rules: [
@@ -31,10 +28,14 @@ module.exports = {
use: [{
loader: 'css-loader',
options: {
- minimize: true
+ minimize: true,
+ sourceMap: true
}
}, {
- loader: 'sass-loader'
+ loader: 'sass-loader',
+ options: {
+ sourceMap: true
+ }
}],
fallback: 'style-loader'
})