bpms_site/.svn/pristine/02/02ad50504bbf5abc189067c23cff7450547a1dd9.svn-base
2025-11-02 16:38:49 +03:30

33 lines
1.1 KiB
Plaintext

import { normalizePagePath } from "../../../../../shared/lib/page-path/normalize-page-path";
import { Normalizers } from "../../normalizers";
import { PrefixingNormalizer } from "../../prefixing-normalizer";
import { wrapNormalizerFn } from "../../wrap-normalizer-fn";
export class PagesBundlePathNormalizer extends Normalizers {
constructor(){
super([
// The bundle path should have the trailing `/index` stripped from
// it.
wrapNormalizerFn(normalizePagePath),
// The page should prefixed with `pages/`.
new PrefixingNormalizer("pages")
]);
}
normalize(page) {
return super.normalize(page);
}
}
export class DevPagesBundlePathNormalizer extends Normalizers {
constructor(pagesNormalizer){
super([
// This should normalize the filename to a page.
pagesNormalizer,
// Normalize the app page to a pathname.
new PagesBundlePathNormalizer()
]);
}
normalize(filename) {
return super.normalize(filename);
}
}
//# sourceMappingURL=pages-bundle-path-normalizer.js.map