mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 04:16:17 +01:00 
			
		
		
		
	build(webpack): copy required excalidraw fonts
This commit is contained in:
		@@ -4,6 +4,7 @@ import autoprefixer from "autoprefixer";
 | 
				
			|||||||
import assetPath from "./src/services/asset_path.js";
 | 
					import assetPath from "./src/services/asset_path.js";
 | 
				
			||||||
import miniCssExtractPlugin from "mini-css-extract-plugin";
 | 
					import miniCssExtractPlugin from "mini-css-extract-plugin";
 | 
				
			||||||
import type { Configuration } from "webpack";
 | 
					import type { Configuration } from "webpack";
 | 
				
			||||||
 | 
					import CopyPlugin from "copy-webpack-plugin";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const rootDir = path.dirname(fileURLToPath(import.meta.url));
 | 
					const rootDir = path.dirname(fileURLToPath(import.meta.url));
 | 
				
			||||||
const config: Configuration = {
 | 
					const config: Configuration = {
 | 
				
			||||||
@@ -26,6 +27,15 @@ const config: Configuration = {
 | 
				
			|||||||
        new miniCssExtractPlugin({
 | 
					        new miniCssExtractPlugin({
 | 
				
			||||||
            // TriliumNextTODO: enable this, once webpack build outputs into the "build" folder, instead of "src/public/app-dist" folder => @pano9000
 | 
					            // TriliumNextTODO: enable this, once webpack build outputs into the "build" folder, instead of "src/public/app-dist" folder => @pano9000
 | 
				
			||||||
            //filename: "../stylesheets/[name].css"
 | 
					            //filename: "../stylesheets/[name].css"
 | 
				
			||||||
 | 
					        }),
 | 
				
			||||||
 | 
					        new CopyPlugin({
 | 
				
			||||||
 | 
					            patterns: [
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    context: "node_modules/@excalidraw/excalidraw/dist/prod/fonts/",
 | 
				
			||||||
 | 
					                    from: "**/*",
 | 
				
			||||||
 | 
					                    to: "fonts/excalidraw/"
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    module: {
 | 
					    module: {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user