mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Improved dev server performance by skipping icons in watch mode
This commit is contained in:
parent
1606052cd7
commit
bebf7d1419
@ -207,37 +207,41 @@ export default (_env: never, args: Configuration): Configuration[] => {
|
|||||||
filename: `[name]${hash}.css`
|
filename: `[name]${hash}.css`
|
||||||
}),
|
}),
|
||||||
|
|
||||||
/* FontAwesome icons */
|
/* Improve performance by skipping icons in watch mode */
|
||||||
new CopyPlugin({
|
...args.watch ? [] : [
|
||||||
patterns: [
|
|
||||||
{ to: ".icons/fontawesome", from: "**/*.svg" },
|
|
||||||
{ to: ".icons/fontawesome", from: "../LICENSE.txt" }
|
|
||||||
].map(pattern => ({
|
|
||||||
context: "node_modules/@fortawesome/fontawesome-free/svgs",
|
|
||||||
...pattern
|
|
||||||
}))
|
|
||||||
}),
|
|
||||||
|
|
||||||
/* Material Design icons */
|
/* FontAwesome icons */
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ to: ".icons/material", from: "*.svg" }
|
{ to: ".icons/fontawesome", from: "**/*.svg" },
|
||||||
].map(pattern => ({
|
{ to: ".icons/fontawesome", from: "../LICENSE.txt" }
|
||||||
context: "node_modules/@mdi/svg/svg",
|
].map(pattern => ({
|
||||||
...pattern
|
context: "node_modules/@fortawesome/fontawesome-free/svgs",
|
||||||
}))
|
...pattern
|
||||||
}),
|
}))
|
||||||
|
}),
|
||||||
|
|
||||||
/* GitHub octicons */
|
/* Material Design icons */
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ to: ".icons/octicons", from: "*.svg" },
|
{ to: ".icons/material", from: "*.svg" }
|
||||||
{ to: ".icons/octicons", from: "../../LICENSE" }
|
].map(pattern => ({
|
||||||
].map(pattern => ({
|
context: "node_modules/@mdi/svg/svg",
|
||||||
context: "node_modules/@primer/octicons/build/svg",
|
...pattern
|
||||||
...pattern
|
}))
|
||||||
}))
|
}),
|
||||||
}),
|
|
||||||
|
/* GitHub octicons */
|
||||||
|
new CopyPlugin({
|
||||||
|
patterns: [
|
||||||
|
{ to: ".icons/octicons", from: "*.svg" },
|
||||||
|
{ to: ".icons/octicons", from: "../../LICENSE" }
|
||||||
|
].map(pattern => ({
|
||||||
|
context: "node_modules/@primer/octicons/build/svg",
|
||||||
|
...pattern
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
],
|
||||||
|
|
||||||
/* Search stemmers and segmenters */
|
/* Search stemmers and segmenters */
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
|
Loading…
Reference in New Issue
Block a user