mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 09:27:19 +08:00
15 lines
523 B
JavaScript
15 lines
523 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.assetPathPlugin = void 0;
|
|
const utils_1 = require("../utils");
|
|
exports.assetPathPlugin = ({ app, resolver }) => {
|
|
app.use(async (ctx, next) => {
|
|
if (resolver.isAssetRequest(ctx.path) && utils_1.isImportRequest(ctx)) {
|
|
ctx.type = 'js';
|
|
ctx.body = `export default ${JSON.stringify(ctx.path)}`;
|
|
return;
|
|
}
|
|
return next();
|
|
});
|
|
};
|
|
//# sourceMappingURL=serverPluginAssets.js.map
|