mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	webpack: add bootstrap webpack config
https://getbootstrap.com/docs/5.3/getting-started/webpack/
This commit is contained in:
		
							parent
							
								
									17860e6715
								
							
						
					
					
						commit
						fc6b9e00bc
					
				| @ -1,5 +1,6 @@ | |||||||
| import { fileURLToPath } from "url"; | import { fileURLToPath } from "url"; | ||||||
| import path from "path"; | import path from "path"; | ||||||
|  | import autoprefixer from "autoprefixer"; | ||||||
| import assetPath from "./src/services/asset_path.js"; | import assetPath from "./src/services/asset_path.js"; | ||||||
| import type { Configuration } from "webpack"; | import type { Configuration } from "webpack"; | ||||||
| 
 | 
 | ||||||
| @ -30,6 +31,29 @@ const config: Configuration = { | |||||||
|                     } |                     } | ||||||
|                 ], |                 ], | ||||||
|                 exclude: /node_modules/ |                 exclude: /node_modules/ | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |                 // bootstrap CSS related configuration
 | ||||||
|  |                 test: /\.(scss)$/, | ||||||
|  |                 use: [ | ||||||
|  |                     { | ||||||
|  |                         loader: "style-loader" | ||||||
|  |                     }, | ||||||
|  |                     { | ||||||
|  |                         loader: "css-loader" | ||||||
|  |                     }, | ||||||
|  |                     { | ||||||
|  |                         loader: "postcss-loader", | ||||||
|  |                         options: { | ||||||
|  |                             postcssOptions: { | ||||||
|  |                                 plugins: [autoprefixer] | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|  |                     }, | ||||||
|  |                     { | ||||||
|  |                         loader: "sass-loader" | ||||||
|  |                     } | ||||||
|  |                 ] | ||||||
|             } |             } | ||||||
|         ] |         ] | ||||||
|     }, |     }, | ||||||
| @ -41,8 +65,8 @@ const config: Configuration = { | |||||||
|             ".mjs": [".mjs", ".mts"] |             ".mjs": [".mjs", ".mts"] | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|     devtool: "source-map", |     //devtool: "none",
 | ||||||
|     target: "electron-renderer" |     target: "electron-renderer" | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| export default config; | export default config; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Panagiotis Papadopoulos
						Panagiotis Papadopoulos