text: (window.webpackJsonp=window.webpackJsonp||[]).push([[25],{455:function(t,e,a){"use strict";a.r(e);var s=a(15),r=Object(s.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"config-reference"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#config-reference"}},[t._v("#")]),t._v(" Config Reference")]),t._v(" "),a("Bit"),t._v(" "),a("h2",{attrs:{id:"basic-config"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#basic-config"}},[t._v("#")]),t._v(" Basic Config")]),t._v(" "),a("h3",{attrs:{id:"base"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#base"}},[t._v("#")]),t._v(" base")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("/")])])]),t._v(" "),a("p",[t._v("The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path, for example, GitHub pages. If you plan to deploy your site to "),a("code",[t._v("https://foo.github.io/bar/")]),t._v(", then you should set "),a("code",[t._v("base")]),t._v(" to "),a("code",[t._v('"/bar/"')]),t._v(". It should always start and end with a slash.")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("base")]),t._v(" is automatically prepended to all the URLs that start with "),a("code",[t._v("/")]),t._v(" in other options, so you only need to specify it once.")]),t._v(" "),a("p",[a("strong",[t._v("Also see:")])]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/guide/assets.html#base-url"}},[t._v("Base URL")])],1),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/guide/deploy.html#github-pages"}},[t._v("Deploy Guide > GitHub Pages")])],1)]),t._v(" "),a("h3",{attrs:{id:"title"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#title"}},[t._v("#")]),t._v(" title")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Title for the site. This will be the prefix for all page titles, and displayed in the navbar in the default theme.")]),t._v(" "),a("h3",{attrs:{id:"description"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" description")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Description for the site. This will render as a "),a("code",[t._v("<meta>")]),t._v(" tag in the page HTML.")]),t._v(" "),a("h3",{attrs:{id:"head"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#head"}},[t._v("#")]),t._v(" head")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Array")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]")])])]),t._v(" "),a("p",[t._v("Extra tags to inject into the page HTML "),a("code",[t._v("<head>")]),t._v(". You can specify each tag in the form of "),a("code",[t._v("[tagName, { attrName: attrValue }, innerHTML?]")]),t._v(". For example, to add a custom favicon:")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  head"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'link'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" rel"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'icon'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" href"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/logo.png'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"host"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#host"}},[t._v("#")]),t._v(" host")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("'0.0.0.0'")])])]),t._v(" "),a("p",[t._v("Specify the host to use for the dev server.")]),t._v(" "),a("h3",{attrs:{id:"port"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#port"}},[t._v("#")]),t._v(" port")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("number")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("8080")])])]),t._v(" "),a("p",[t._v("Specify the port to use for the dev server.")]),t._v(" "),a("h3",{attrs:{id:"temp"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#temp"}},[t._v("#")]),t._v(" temp")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("/path/to/@vuepress/core/.temp")])])]),t._v(" "),a("p",[t._v("Specify the temporary directory for client.")]),t._v(" "),a("h3",{attrs:{id:"dest"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dest"}},[t._v("#")]),t._v(" dest")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v(".vuepress/dist")])])]),t._v(" "),a("p",[t._v("Specify the output directory for "),a("code",[t._v("vuepress build")]),t._v(". If a relative path is specified, it will be resolved based on "),a("code",[t._v("process.cwd()")]),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"locales"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#locales"}},[t._v("#")]),t._v(" locales")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("{ [path: string]: Object }")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Specify locales for i18n support. For more details, see the guide on "),a("RouterLink",{attrs:{to:"/guide/i18n.html"}},[t._v("Internationalization")]),t._v(".")],1),t._v(" "),a("h3",{attrs:{id:"shouldprefetch"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#shouldprefetch"}},[t._v("#")]),t._v(" shouldPrefetch")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Function")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("() => true")])])]),t._v(" "),a("p",[t._v("A function to control what files should have "),a("code",[t._v('<link rel="prefetch">')]),t._v(" resource hints generated. See "),a("a",{attrs:{href:"https://ssr.vuejs.org/api/#shouldprefetch",target:"_blank",rel:"noopener noreferrer"}},[t._v("shouldPrefetch"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"cache"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cache"}},[t._v("#")]),t._v(" cache")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("boolean|string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("true")])])]),t._v(" "),a("p",[t._v("VuePress uses "),a("a",{attrs:{href:"https://github.com/webpack-contrib/cache-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("cache-loader"),a("OutboundLink")],1),t._v(" by default to greatly speed up the compilation of webpack.")]),t._v(" "),a("p",[t._v("You can use this option to specify the path to the cache, and can also remove the cache before each build by setting it to "),a("code",[t._v("false")]),t._v(".")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),a("p",[t._v("You can also use this option through the CLI:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[t._v("vuepress dev docs --cache .cache "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# set cache path")]),t._v("\nvuepress dev docs --no-cache     "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# remove cache before each build.")]),t._v("\n")])])])]),t._v(" "),a("h3",{attrs:{id:"extrawatchfiles"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#extrawatchfiles"}},[t._v("#")]),t._v(" extraWatchFiles")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Array")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("[]")])])]),t._v(" "),a("p",[t._v("Specify extra files to watch.")]),t._v(" "),a("p",[t._v("You can watch any file if you want. File changes will trigger "),a("code",[t._v("vuepress")]),t._v(" rebuilding and real-time updates.")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  extraWatchFiles"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'.vuepress/foo.js'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Relative path usage")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/path/to/bar.js'")]),t._v("   "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Absolute path usage")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"patterns"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#patterns"}},[t._v("#")]),t._v(" patterns")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Array")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("['**/*.md', '**/*.vue']")])])]),t._v(" "),a("p",[t._v("Specify which pattern of files you want to be resolved.")]),t._v(" "),a("h2",{attrs:{id:"styling"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#styling"}},[t._v("#")]),t._v(" Styling")]),t._v(" "),a("h3",{attrs:{id:"palette-styl"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#palette-styl"}},[t._v("#")]),t._v(" palette.styl")]),t._v(" "),a("p",[t._v("To apply simple overrides to the styling of the "),a("a",{attrs:{href:"https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/core/lib/client/style/config.styl",target:"_blank",rel:"noopener noreferrer"}},[t._v("default preset"),a("OutboundLink")],1),t._v(" or define some variables to use later, you can create a "),a("code",[t._v(".vuepress/styles/palette.styl")]),t._v(" file.")]),t._v(" "),a("p",[t._v("There are some predefined variables you can tweak:")]),t._v(" "),a("div",{staticClass:"language-stylus extra-class"},[a("pre",{pre:!0,attrs:{class:"language-stylus"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// colors")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$accentColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#3eaf7c")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$textColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#2c3e50")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$borderColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#eaecef")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$codeBgColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#282c34")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$arrowBgColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#ccc")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$badgeTipColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#42b983")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$badgeWarningColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token func"}},[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("darken")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#ffe564")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("35")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("%")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")])])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$badgeErrorColor")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token hexcode"}},[t._v("#DA5961")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// layout")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$navbarHeight")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("rem")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sidebarWidth")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("rem")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$contentWidth")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("740")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("px")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$homePageWidth")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("960")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("px")])]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// responsive breakpoints")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$MQNarrow")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("959")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("px")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$MQMobile")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("719")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("px")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token variable-declaration"}},[a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$MQMobileNarrow")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("419")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("px")])]),t._v("\n")])])]),a("div",{staticClass:"custom-block danger"},[a("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),a("p",[t._v("You should ONLY define variables in this file. Since "),a("code",[t._v("palette.styl")]),t._v(" will be imported at the end of the root Stylus config file, as a config, several files will use it, so once you wrote styles here, your style would be duplicated by multiple times.")])]),t._v(" "),a("h3",{attrs:{id:"index-styl"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-styl"}},[t._v("#")]),t._v(" index.styl")]),t._v(" "),a("p",[t._v("VuePress provides a convenient way to add extra styles. You can create a "),a("code",[t._v(".vuepress/styles/index.styl")]),t._v(" file for that. This is a "),a("a",{attrs:{href:"http://stylus-lang.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Stylus"),a("OutboundLink")],1),t._v(" file but you can use normal CSS syntax as well.")]),t._v(" "),a("div",{staticClass:"language-stylus extra-class"},[a("pre",{pre:!0,attrs:{class:"language-stylus"}},[a("code",[a("span",{pre:!0,attrs:{class:"token selector"}},[t._v(".content "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")])]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token property-declaration"}},[a("span",{pre:!0,attrs:{class:"token property"}},[t._v("font-size")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),a("span",{pre:!0,attrs:{class:"token unit"}},[t._v("px")])]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),a("p",[t._v("Because of the behavior behind the scenes, in both "),a("code",[t._v("palette.styl")]),t._v(" and "),a("code",[t._v("index.styl")]),t._v(", the normal "),a("code",[t._v(".css")]),t._v(" style sheets are not allowed to be imported by "),a("a",{attrs:{href:"https://stylus-lang.com/docs/import.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("@import / @require"),a("OutboundLink")],1),t._v(" from "),a("strong",[t._v("relative paths")]),t._v(".")])]),t._v(" "),a("details",{staticClass:"custom-block details"},[a("summary",[t._v("What if you have to import / require normal `css` style sheets?")]),t._v(" "),a("p",[t._v("Use "),a("strong",[t._v("Absolute path")]),t._v(".")]),t._v(" "),a("ol",[a("li",[t._v("Importing / requiring a file from an npm package:")])]),t._v(" "),a("div",{staticClass:"language-stylus extra-class"},[a("pre",{pre:!0,attrs:{class:"language-stylus"}},[a("code",[a("span",{pre:!0,attrs:{class:"token atrule-declaration"}},[a("span",{pre:!0,attrs:{class:"token atrule"}},[t._v("@require")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'~my-css-package/style.css'")])]),t._v("\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[t._v("Importing / requiring a local file:")])]),t._v(" "),a("p",[t._v("As there’s an "),a("RouterLink",{attrs:{to:"/plugin/option-api.html#alias"}},[t._v("alias")]),t._v(" option out there, using webpack alias must be the simplest approach. For example:")],1),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// config.js")]),t._v("\n alias"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'styles'")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("resolve")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("__dirname"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'./styles'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"language-stylus extra-class"},[a("pre",{pre:!0,attrs:{class:"language-stylus"}},[a("code",[a("span",{pre:!0,attrs:{class:"token atrule-declaration"}},[a("span",{pre:!0,attrs:{class:"token atrule"}},[t._v("@require")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'~styles/style.css'")])]),t._v("\n")])])])]),t._v(" "),a("p",[a("strong",[t._v("Also see:")])]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/faq/#why-can-t-palette-styl-and-index-styl-merge-into-one-api"}},[t._v("Why can’t "),a("code",[t._v("palette.styl")]),t._v(" and "),a("code",[t._v("index.styl")]),t._v(" merge into one API?")])],1)]),t._v(" "),a("h2",{attrs:{id:"theming"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#theming"}},[t._v("#")]),t._v(" Theming")]),t._v(" "),a("h3",{attrs:{id:"theme"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#theme"}},[t._v("#")]),t._v(" theme")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Specify this to use a custom theme.")]),t._v(" "),a("p",[a("strong",[t._v("Also see:")])]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/theme/using-a-theme.html"}},[t._v("Using a theme")]),t._v(".")],1)]),t._v(" "),a("h3",{attrs:{id:"themeconfig"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#themeconfig"}},[t._v("#")]),t._v(" themeConfig")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("Provide config options to the used theme. The options will vary depending on the theme you are using.")]),t._v(" "),a("p",[a("strong",[t._v("Also see:")])]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/theme/default-theme-config.html"}},[t._v("Default Theme Configuration")]),t._v(".")],1)]),t._v(" "),a("h2",{attrs:{id:"pluggable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pluggable"}},[t._v("#")]),t._v(" Pluggable")]),t._v(" "),a("h3",{attrs:{id:"plugins"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#plugins"}},[t._v("#")]),t._v(" plugins")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object|Array")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Please check out "),a("RouterLink",{attrs:{to:"/plugin/using-a-plugin.html"}},[t._v("Plugin > Using a plugin")]),t._v(" to learn how to use a plugin.")],1),t._v(" "),a("h2",{attrs:{id:"markdown"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown"}},[t._v("#")]),t._v(" Markdown")]),t._v(" "),a("h3",{attrs:{id:"markdown-linenumbers"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-linenumbers"}},[t._v("#")]),t._v(" markdown.lineNumbers")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("boolean")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Whether to show line numbers to the left of each code blocks.")]),t._v(" "),a("p",[a("strong",[t._v("Also see:")])]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/guide/markdown.html#line-numbers"}},[t._v("Line Numbers")])],1)]),t._v(" "),a("h3",{attrs:{id:"markdown-slugify"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-slugify"}},[t._v("#")]),t._v(" markdown.slugify")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Function")])]),t._v(" "),a("li",[t._v("Default: "),a("a",{attrs:{href:"https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/shared-utils/src/slugify.ts",target:"_blank",rel:"noopener noreferrer"}},[t._v("source"),a("OutboundLink")],1)])]),t._v(" "),a("p",[t._v("Function for transforming "),a("RouterLink",{attrs:{to:"/miscellaneous/glossary.html#headers"}},[t._v("header")]),t._v(" texts into slugs. Changing this affects the ids/links generated for header anchors, "),a("RouterLink",{attrs:{to:"/guide/markdown.html#table-of-contents"}},[t._v("table of contents")]),t._v(" and "),a("RouterLink",{attrs:{to:"/theme/default-theme-config.html#sidebar"}},[t._v("sidebar")]),t._v(" links.")],1),t._v(" "),a("h3",{attrs:{id:"markdown-anchor"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-anchor"}},[t._v("#")]),t._v(" markdown.anchor")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{ permalink: true, permalinkBefore: true, permalinkSymbol: '#' }")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/valeriangalliat/markdown-it-anchor",target:"_blank",rel:"noopener noreferrer"}},[t._v("markdown-it-anchor"),a("OutboundLink")],1),t._v(". (Note: prefer "),a("code",[t._v("markdown.slugify")]),t._v(" to customize header ids.)")]),t._v(" "),a("h3",{attrs:{id:"markdown-pagesuffix"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-pagesuffix"}},[t._v("#")]),t._v(" markdown.pageSuffix")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("string")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v(".html")])])]),t._v(" "),a("p",[t._v("Option to customize internal links to be compatible when using the "),a("a",{attrs:{href:"https://vuepress.github.io/en/plugins/clean-urls/",target:"_blank",rel:"noopener noreferrer"}},[t._v("vuepress-plugin-clean-urls"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"markdown-externallinks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-externallinks"}},[t._v("#")]),t._v(" markdown.externalLinks")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{ target: '_blank', rel: 'noopener noreferrer' }")])])]),t._v(" "),a("p",[t._v("The key and value pair will be added to "),a("code",[t._v("<a>")]),t._v(" tags that point to an external link. The default option will open external links in a new window.")]),t._v(" "),a("h3",{attrs:{id:"markdown-toc"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-toc"}},[t._v("#")]),t._v(" markdown.toc")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{ includeLevel: [2, 3] }")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/Oktavilla/markdown-it-table-of-contents",target:"_blank",rel:"noopener noreferrer"}},[t._v("markdown-it-table-of-contents"),a("OutboundLink")],1),t._v(". (Note: prefer "),a("code",[t._v("markdown.slugify")]),t._v(" to customize header ids.)")]),t._v(" "),a("h3",{attrs:{id:"markdown-plugins"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-plugins"}},[t._v("#")]),t._v(" markdown.plugins")]),t._v(" "),a("p",[t._v("You can install any markdown-it plugins through "),a("code",[t._v("markdown.plugins")]),t._v(" option. It’s similar with "),a("RouterLink",{attrs:{to:"/plugin/using-a-plugin.html#using-a-plugin"}},[t._v("using VuePress plugins")]),t._v(". You can either use Babel style or object style. The "),a("code",[t._v("markdown-it-")]),t._v(" prefix is optional and can omit in the list.")],1),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  markdown"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    plugins"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@org/foo'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// equals to @org/markdown-it-foo if exists")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'markdown-it-bar'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n        "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// provide options here")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("p",[t._v("Or")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  markdown"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    plugins"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@org/foo'")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'markdown-it-bar'")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n        "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// provide options here")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"markdown-extendmarkdown"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-extendmarkdown"}},[t._v("#")]),t._v(" markdown.extendMarkdown")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Function")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("A function to edit default config or apply extra plugins to the "),a("a",{attrs:{href:"https://github.com/markdown-it/markdown-it",target:"_blank",rel:"noopener noreferrer"}},[t._v("markdown-it"),a("OutboundLink")],1),t._v(" instance used to render source files. For example:")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  markdown"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("extendMarkdown")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("md")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n      md"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("set")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" breaks"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n      md"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'markdown-it-xxx'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),a("p",[t._v("This option is also included in "),a("RouterLink",{attrs:{to:"/plugin/option-api.html#extendmarkdown"}},[t._v("Plugin API")]),t._v(".")],1)]),t._v(" "),a("h3",{attrs:{id:"markdown-extractheaders"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#markdown-extractheaders"}},[t._v("#")]),t._v(" markdown.extractHeaders")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Array")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("['h2', 'h3']")])])]),t._v(" "),a("p",[t._v("While preparing the page, headers are extracted from the Markdown file and stored in "),a("code",[t._v("this.$page.headers")]),t._v(". By default, VuePress will extract "),a("code",[t._v("h2")]),t._v(" and "),a("code",[t._v("h3")]),t._v(" elements for you. You can override the headers it pulls out in your "),a("code",[t._v("markdown")]),t._v(" options.")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  markdown"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    extractHeaders"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'h2'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'h3'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'h4'")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"build-pipeline"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#build-pipeline"}},[t._v("#")]),t._v(" Build Pipeline")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Configuring CSS Pre-processors")]),t._v(" "),a("p",[t._v("VuePress comes with built-in webpack config for the CSS pre-processors listed below. For more information on installation these or pre-processors without built-in support, see "),a("RouterLink",{attrs:{to:"/guide/using-vue.html#using-pre-processors"}},[t._v("Using Pre-Processors")]),t._v(" for more information.")],1)]),t._v(" "),a("h3",{attrs:{id:"postcss"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#postcss"}},[t._v("#")]),t._v(" postcss")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{ plugins: [require('autoprefixer')] }")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/postcss/postcss-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("postcss-loader"),a("OutboundLink")],1),t._v(". Note specifying this value will overwrite autoprefixer and you will need to include it yourself.")]),t._v(" "),a("h3",{attrs:{id:"stylus"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#stylus"}},[t._v("#")]),t._v(" Stylus")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{ preferPathResolver: 'webpack' }")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/shama/stylus-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("stylus-loader"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"scss"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#scss"}},[t._v("#")]),t._v(" scss")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/webpack-contrib/sass-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("sass-loader"),a("OutboundLink")],1),t._v(" to load "),a("code",[t._v("*.scss")]),t._v(" files.")]),t._v(" "),a("h3",{attrs:{id:"sass"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sass"}},[t._v("#")]),t._v(" Sass")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{ indentedSyntax: true }")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/webpack-contrib/sass-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("sass-loader"),a("OutboundLink")],1),t._v(" to load "),a("code",[t._v("*.sass")]),t._v(" files.")]),t._v(" "),a("h3",{attrs:{id:"less"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#less"}},[t._v("#")]),t._v(" less")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("{}")])])]),t._v(" "),a("p",[t._v("Options for "),a("a",{attrs:{href:"https://github.com/webpack-contrib/less-loader",target:"_blank",rel:"noopener noreferrer"}},[t._v("less-loader"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"configurewebpack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#configurewebpack"}},[t._v("#")]),t._v(" configureWebpack")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Object | Function")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Edit the internal webpack config. If the value is an Object, it will be merged into the final config using "),a("a",{attrs:{href:"https://github.com/survivejs/webpack-merge",target:"_blank",rel:"noopener noreferrer"}},[t._v("webpack-merge"),a("OutboundLink")],1),t._v("; If the value is a function, it will receive the config as the 1st argument and an "),a("code",[t._v("isServer")]),t._v(" flag as the 2nd argument. You can either mutate the config directly, or return an object to merge:")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("configureWebpack")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("config"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" isServer")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("isServer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n      "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// mutate the config for client")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"chainwebpack"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chainwebpack"}},[t._v("#")]),t._v(" chainWebpack")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("Function")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("undefined")])])]),t._v(" "),a("p",[t._v("Edit the internal webpack config with "),a("a",{attrs:{href:"https://github.com/mozilla-neutrino/webpack-chain",target:"_blank",rel:"noopener noreferrer"}},[t._v("webpack-chain"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("module"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("exports "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("chainWebpack")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("config"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" isServer")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n    "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// config is an instance of ChainableConfig")]),t._v("\n  "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h2",{attrs:{id:"browser-compatibility"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#browser-compatibility"}},[t._v("#")]),t._v(" Browser Compatibility")]),t._v(" "),a("h3",{attrs:{id:"evergreen"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#evergreen"}},[t._v("#")]),t._v(" evergreen")]),t._v(" "),a("ul",[a("li",[t._v("Type: "),a("code",[t._v("boolean | Function")])]),t._v(" "),a("li",[t._v("Default: "),a("code",[t._v("false")])])]),t._v(" "),a("p",[t._v("Set to "),a("code",[t._v("true")]),t._v(" if you are only targeting evergreen browsers. This will disable ES5 transpilation and polyfills for IE, and result in faster builds and smaller files.")])],1)}),[],!1,null,null,null);e.default=r.exports}}]);