mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore(examples): add routify set-up
This commit is contained in:
parent
a4aa2d9c77
commit
1d479eb835
16 changed files with 2885 additions and 0 deletions
28
examples/routify/rollup.config.js
Normal file
28
examples/routify/rollup.config.js
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue