aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-12-03 10:32:46 -0500
committertaehoon <th.dev91@gmail.com>2019-12-03 10:32:46 -0500
commitafd4524c3920f8426051e0673b42f022cb3627fe (patch)
tree1a5646b947b1357e6c48e48a5d5092682a0305c4 /build
parent0082ed837ed0b4b9a047520460782562bad0d8aa (diff)
use another approach for versioning font files
Diffstat (limited to 'build')
-rw-r--r--build/webpack.base.conf.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index f8968966..9313ec20 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -3,6 +3,7 @@ var config = require('../config')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin')
+var FontelloPlugin = require("fontello-webpack-plugin")
var env = process.env.NODE_ENV
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
@@ -11,6 +12,8 @@ var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap)
var cssSourceMapProd = (env === 'production' && config.build.productionSourceMap)
var useCssSourceMap = cssSourceMapDev || cssSourceMapProd
+var now = Date.now()
+
module.exports = {
entry: {
app: './src/main.js'
@@ -90,6 +93,14 @@ module.exports = {
new ServiceWorkerWebpackPlugin({
entry: path.join(__dirname, '..', 'src/sw.js'),
filename: 'sw-pleroma.js'
+ }),
+ new FontelloPlugin({
+ config: require('../static/fontello.json'),
+ name: 'fontello',
+ output: {
+ css: '[name].' + now + '.css', // [hash] is not supported. Use the current timestamp instead for versioning.
+ font: 'font/[name].' + now + '.[ext]'
+ }
})
]
}