mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
fix(build): use last hash file name in client manifest (#123)
This commit is contained in:
parent
3d06693f88
commit
8e320f80aa
@ -7,7 +7,6 @@ import { dirname } from 'path'
|
|||||||
import hash from 'hash-sum'
|
import hash from 'hash-sum'
|
||||||
import uniq from 'lodash/uniq'
|
import uniq from 'lodash/uniq'
|
||||||
import { writeFile, mkdirp } from 'fs-extra'
|
import { writeFile, mkdirp } from 'fs-extra'
|
||||||
import { Compilation } from 'webpack'
|
|
||||||
|
|
||||||
import { isJS, isCSS } from './util'
|
import { isJS, isCSS } from './util'
|
||||||
|
|
||||||
@ -23,11 +22,7 @@ export default class VueSSRClientPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply (compiler) {
|
apply (compiler) {
|
||||||
compiler.hooks.make.tap('VueSSRClientPlugin', (compilation: any) => {
|
compiler.hooks.afterEmit.tap('VueSSRClientPlugin', async (compilation: any) => {
|
||||||
compilation.hooks.processAssets.tapAsync({
|
|
||||||
name: 'VueSSRClientPlugin',
|
|
||||||
stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL
|
|
||||||
}, async (_assets, cb) => {
|
|
||||||
const stats = compilation.getStats().toJson()
|
const stats = compilation.getStats().toJson()
|
||||||
|
|
||||||
const allFiles = uniq(stats.assets
|
const allFiles = uniq(stats.assets
|
||||||
@ -118,9 +113,6 @@ export default class VueSSRClientPlugin {
|
|||||||
// source: () => src,
|
// source: () => src,
|
||||||
// size: () => src.length
|
// size: () => src.length
|
||||||
// }
|
// }
|
||||||
|
|
||||||
cb()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user