2023-06-27 05:59:03 +00:00
|
|
|
import type { PresetAsset } from "presetter-types";
|
|
|
|
import { PresetContext } from "presetter-types";
|
2023-06-30 05:58:41 +00:00
|
|
|
import { createRequire } from "node:module";
|
|
|
|
|
|
|
|
const require = createRequire(import.meta.url);
|
2023-06-27 05:59:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* get the list of templates provided by this preset
|
|
|
|
* @returns list of preset templates
|
|
|
|
*/
|
|
|
|
export default async function (context: PresetContext): Promise<PresetAsset> {
|
|
|
|
const ignores = !context.custom.config?.official
|
|
|
|
? [".github/workflows/ci.yml"]
|
|
|
|
: [];
|
|
|
|
|
|
|
|
return {
|
2023-06-30 05:58:41 +00:00
|
|
|
extends: [
|
|
|
|
"@lumeweb/node-library-preset",
|
|
|
|
"@lumeweb/presetter-preset-rollup",
|
|
|
|
],
|
2023-06-27 05:59:03 +00:00
|
|
|
supplementaryIgnores: ignores,
|
2023-06-29 21:57:25 +00:00
|
|
|
supplementaryConfig: {
|
|
|
|
rollup: {
|
2023-06-30 05:58:41 +00:00
|
|
|
plugins: [
|
2023-06-30 06:18:35 +00:00
|
|
|
[
|
|
|
|
"@apply @rollup/plugin-wasm[default]",
|
|
|
|
{
|
|
|
|
targetEnv: "auto-inline",
|
|
|
|
},
|
|
|
|
],
|
2023-06-30 05:58:41 +00:00
|
|
|
],
|
2023-06-29 21:57:25 +00:00
|
|
|
},
|
|
|
|
},
|
2023-06-27 05:59:03 +00:00
|
|
|
};
|
|
|
|
}
|