forked from ProjectEvergreen/greenwood
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreenwood.config.js
48 lines (47 loc) · 1.47 KB
/
greenwood.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { greenwoodPluginGraphQL } from '@greenwood/plugin-graphql';
import { greenwoodPluginIncludeHTML } from '@greenwood/plugin-include-html';
import { greenwoodPluginImportCss } from '@greenwood/plugin-import-css';
import { greenwoodPluginImportJson } from '@greenwood/plugin-import-json';
import { greenwoodPluginPolyfills } from '@greenwood/plugin-polyfills';
import { greenwoodPluginPostCss } from '@greenwood/plugin-postcss';
import { greenwoodPluginRendererPuppeteer } from '@greenwood/plugin-renderer-puppeteer';
import rollupPluginAnalyzer from 'rollup-plugin-analyzer';
import { fileURLToPath, URL } from 'url';
export default {
workspace: fileURLToPath(new URL('./www', import.meta.url)),
prerender: true,
optimization: 'inline',
staticRouter: true,
interpolateFrontmatter: true,
plugins: [
greenwoodPluginGraphQL(),
greenwoodPluginPolyfills(),
greenwoodPluginPostCss(),
greenwoodPluginImportJson(),
greenwoodPluginImportCss(),
{
type: 'rollup',
name: 'rollup-plugin-analyzer',
provider: () => {
return [
rollupPluginAnalyzer({
summaryOnly: true,
filter: (module) => {
return !module.id.endsWith('.html');
}
})
];
}
},
greenwoodPluginIncludeHTML(),
greenwoodPluginRendererPuppeteer()
],
markdown: {
plugins: [
'@mapbox/rehype-prism',
'rehype-slug',
'rehype-autolink-headings',
'remark-github'
]
}
};