mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Improved Webpack watch mode
This commit is contained in:
parent
bebf7d1419
commit
c75fca5105
@ -207,7 +207,7 @@ export default (_env: never, args: Configuration): Configuration[] => {
|
|||||||
filename: `[name]${hash}.css`
|
filename: `[name]${hash}.css`
|
||||||
}),
|
}),
|
||||||
|
|
||||||
/* Improve performance by skipping icons in watch mode */
|
/* Improve performance by skipping dependencies in watch mode */
|
||||||
...args.watch ? [] : [
|
...args.watch ? [] : [
|
||||||
|
|
||||||
/* FontAwesome icons */
|
/* FontAwesome icons */
|
||||||
@ -240,8 +240,7 @@ export default (_env: never, args: Configuration): Configuration[] => {
|
|||||||
context: "node_modules/@primer/octicons/build/svg",
|
context: "node_modules/@primer/octicons/build/svg",
|
||||||
...pattern
|
...pattern
|
||||||
}))
|
}))
|
||||||
})
|
}),
|
||||||
],
|
|
||||||
|
|
||||||
/* Search stemmers and segmenters */
|
/* Search stemmers and segmenters */
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
@ -258,12 +257,22 @@ export default (_env: never, args: Configuration): Configuration[] => {
|
|||||||
}))
|
}))
|
||||||
}),
|
}),
|
||||||
|
|
||||||
/* Template files */
|
/* Assets and configuration */
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: ".icons/*.svg" },
|
{ from: ".icons/*.svg" },
|
||||||
{ from: "assets/images/*" },
|
{ from: "assets/images/*" },
|
||||||
{ from: "**/*.{py,yml}" },
|
{ from: "**/*.{py,yml}" }
|
||||||
|
].map(pattern => ({
|
||||||
|
context: "src",
|
||||||
|
...pattern
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
],
|
||||||
|
|
||||||
|
/* Template files */
|
||||||
|
new CopyPlugin({
|
||||||
|
patterns: [
|
||||||
{
|
{
|
||||||
from: "**/*.html",
|
from: "**/*.html",
|
||||||
transform: (content: Buffer) => {
|
transform: (content: Buffer) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user