bundleExportKey: "bundle" (this is the default value) means that you can do this in your 11ty.js template:
export const bundle = {
css: "/* Only adds to css bundle */"
};
export function render() {};
export function data() {};
This works with buckets too, if you nest another object in your export:
export const bundle = {
css: {
default: "/* Only adds to default bucket in css bundle */"
}
};
This works too but probably isn’t what you want:
export const bundle = "/* Adds to all bundles using bundleExportKey: "bundle" */";
This makes more sense, if you want to opt-in to something a bit simpler with a string export direct to a bundle:
bundleExportKey: "css" means that you can do this in your 11ty.js template:
export const css = "/* Some CSS */";
bundleExportKey: "bundle"(this is the default value) means that you can do this in your11ty.jstemplate:This works with buckets too, if you nest another object in your export:
This works too but probably isn’t what you want:
This makes more sense, if you want to opt-in to something a bit simpler with a string export direct to a bundle:
bundleExportKey: "css"means that you can do this in your11ty.jstemplate: