Skip to content

Commit

Permalink
website: modify vite config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 20, 2023
1 parent a8531fe commit ee5341e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 19 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"prepare": "husky install",
"start": "lerna exec \"npm run dev\" --scope website",
"doc": "lerna exec \"npm run build\" --scope website",
"preview": "lerna exec \"npm run preview\" --scope website",
"build": "lerna exec \"tsbb build \"src/*.{tsx,ts}\" --use-babel --use-vue\" --scope @vue-monorepo-template/*",
"watch:simple": "lerna exec \"tsbb watch \"src/*.{tsx,ts}\" --use-babel --use-vue\" --scope @vue-monorepo-template/simple",
"watch:base": "lerna exec \"tsbb watch \"src/*.{tsx,ts}\" --use-babel --use-vue\" --scope @vue-monorepo-template/base",
Expand Down
2 changes: 1 addition & 1 deletion website/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineComponent({

<template>
<div>
<github-corners fixed target="__blank" href="https://github.com/uivjs/vue-markdown-preview" />
<github-corners fixed target="__blank" href="https://github.com/tsbbjs/vue-monorepo-template" />
<header>
<div>
<img src="./assets/vue.svg" alt="Vue Monorepo Template" />
Expand Down
61 changes: 43 additions & 18 deletions website/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { visualizer } from 'rollup-plugin-visualizer';

// https://vitejs.dev/config/
export default defineConfig({
base: '/vue-monorepo-template',
plugins: [
vue(),
raw({
Expand All @@ -24,46 +25,70 @@ export default defineConfig({
output: {
manualChunks: {
vue: ['vue'],
refractor: ['refractor'],
'vue-monorepo-template': ['@vue-monorepo-template/base', '@vue-monorepo-template/simple'],
'hast-util': [
'hast-util-has-property',
'hast-util-heading-rank',
'hast-util-is-element',
'hast-util-to-string',
'hast-util-parse-selector',
'hast-util-from-parse5',
'hast-util-raw',
'hast-util-to-parse5',
'hast-util-select',
'hast-util-whitespace',
'hast-util-to-html',
'hastscript',
'mdast-util-to-hast',
],
unified: [
'unified',
'comma-separated-tokens',
'property-information',
'remark-gfm',
'remark-parse',
'remark-rehype',
'space-separated-tokens',
'style-to-object',
'unified',
],
rehype: [
'refractor',
'rehype-attr',
'rehype-autolink-headings',
'rehype-parse',
'rehype-raw',
'rehype-rewrite',
'rehype-slug',
'rehype-stringify',
'remark-rehype',
],
'vue-markdown-preview': ['@uivjs/vue-markdown-preview'],
'hast-util': ['hast-util-raw', 'hast-util-select', 'mdast-util-to-hast'],
micromark: ['micromark', 'micromark-core-commonmark', 'micromark-extension-gfm-table'],
'rehype-prism-plus': ['rehype-prism-plus'],
'micromark-extension': [
'micromark-util-subtokenize',
'micromark',
'micromark-util-character',
'micromark-util-chunked',
'micromark-util-subtokenize',
'micromark-extension-gfm',
'micromark-extension-gfm-autolink-literal',
'micromark-extension-gfm-footnote',
'micromark-core-commonmark',
'micromark-factory-destination',
'micromark-factory-label',
'micromark-factory-title',
'micromark-factory-whitespace',
'micromark-factory-space',
'micromark-extension-gfm-strikethrough',
'micromark-extension-gfm-table',
'micromark-extension-gfm-tagfilter',
'micromark-extension-gfm-task-list-item',
'mdast-util-gfm-autolink-literal',
'mdast-util-to-markdown',
'mdast-util-find-and-replace',
'mdast-util-gfm-table',
'mdast-util-from-markdown',
'markdown-table',
'github-slugger',
'vfile',
'micromark-util-combine-extensions',
'micromark-util-types',
'micromark-util-decode-numeric-character-reference',
'micromark-util-decode-string',
'micromark-util-normalize-identifier',
'micromark-util-chunked',
'micromark-util-classify-character',
'micromark-util-resolve-all',
'micromark-util-html-tag-name',
'micromark-util-encode',
'micromark-util-subtokenize',
'micromark-util-sanitize-uri',
],
},
},
Expand Down

0 comments on commit ee5341e

Please sign in to comment.