use another approach for versioning font files
This commit is contained in:
parent
0082ed837e
commit
afd4524c39
19 changed files with 198 additions and 1046 deletions
|
@ -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]'
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue