mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 17:37:24 +08:00
26 lines
850 B
JavaScript
26 lines
850 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.createBuildManifestPlugin = void 0;
|
|
exports.createBuildManifestPlugin = () => {
|
|
const manifest = {};
|
|
return {
|
|
name: 'vite:manifest',
|
|
generateBundle(_options, bundle) {
|
|
for (const name in bundle) {
|
|
const chunk = bundle[name];
|
|
if (chunk.type === 'chunk') {
|
|
manifest[chunk.name + '.js'] = chunk.fileName;
|
|
}
|
|
else {
|
|
manifest[chunk.name] = chunk.fileName;
|
|
}
|
|
}
|
|
this.emitFile({
|
|
fileName: 'manifest.json',
|
|
type: 'asset',
|
|
source: JSON.stringify(manifest, null, 2)
|
|
});
|
|
}
|
|
};
|
|
};
|
|
//# sourceMappingURL=buildPluginManifest.js.map
|