chore(examples): add routify set-up

This commit is contained in:
Eric Liu 2020-09-07 14:51:19 -07:00
commit 1d479eb835
16 changed files with 2885 additions and 0 deletions

View file

@ -0,0 +1,28 @@
import { createRollupConfigs } from "./scripts/base.config.js";
import slug from "remark-slug";
import { mdsvex } from "mdsvex";
import autoPreprocess from "svelte-preprocess";
const production = !process.env.ROLLUP_WATCH;
export const config = {
staticDir: "static",
distDir: "dist",
buildDir: "dist/build",
serve: !production,
production,
rollupWrapper: (cfg) => cfg,
svelteWrapper: (svelte) => {
svelte.preprocess = [
autoPreprocess(),
mdsvex({ remarkPlugins: [slug], extension: "md" }),
];
svelte.extensions = [".svelte", ".md"];
return svelte;
},
swWrapper: (cfg) => cfg,
};
const configs = createRollupConfigs(config);
export default configs;