mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +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 uniq from 'lodash/uniq'
|
||||
import { writeFile, mkdirp } from 'fs-extra'
|
||||
import { Compilation } from 'webpack'
|
||||
|
||||
import { isJS, isCSS } from './util'
|
||||
|
||||
@ -23,11 +22,7 @@ export default class VueSSRClientPlugin {
|
||||
}
|
||||
|
||||
apply (compiler) {
|
||||
compiler.hooks.make.tap('VueSSRClientPlugin', (compilation: any) => {
|
||||
compilation.hooks.processAssets.tapAsync({
|
||||
name: 'VueSSRClientPlugin',
|
||||
stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL
|
||||
}, async (_assets, cb) => {
|
||||
compiler.hooks.afterEmit.tap('VueSSRClientPlugin', async (compilation: any) => {
|
||||
const stats = compilation.getStats().toJson()
|
||||
|
||||
const allFiles = uniq(stats.assets
|
||||
@ -118,9 +113,6 @@ export default class VueSSRClientPlugin {
|
||||
// source: () => src,
|
||||
// size: () => src.length
|
||||
// }
|
||||
|
||||
cb()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user