mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 02:44:50 +01:00 
			
		
		
		
	 d6cd8b78f1
			
		
	
	d6cd8b78f1
	
	
	
		
			
			* feat: decouple package deps and introduce yarn workspaces * update root directory * fix * fix scripts * fix lint * update path in scripts * remove yarn.lock files from packages * ignore workspace * dummy * dummy * remove comment check * revert workflow changes * ignore ws when installing gh actions * remove log * update path * fix * fix typo
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const webpack = require("webpack");
 | |
| const path = require("path");
 | |
| const BundleAnalyzerPlugin =
 | |
|   require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
 | |
| 
 | |
| module.exports = {
 | |
|   mode: "production",
 | |
|   entry: { "excalidraw-utils.min": "./index.js" },
 | |
|   output: {
 | |
|     path: path.resolve(__dirname, "dist"),
 | |
|     filename: "[name].js",
 | |
|     library: "ExcalidrawUtils",
 | |
|     libraryTarget: "umd",
 | |
|   },
 | |
|   resolve: {
 | |
|     extensions: [".tsx", ".ts", ".js", ".css", ".scss"],
 | |
|   },
 | |
|   optimization: {
 | |
|     runtimeChunk: false,
 | |
|   },
 | |
|   module: {
 | |
|     rules: [
 | |
|       {
 | |
|         test: /\.(sa|sc|c)ss$/,
 | |
|         exclude: /node_modules/,
 | |
|         use: ["style-loader", { loader: "css-loader" }, "sass-loader"],
 | |
|       },
 | |
|       {
 | |
|         test: /\.(ts|tsx|js)$/,
 | |
|         use: [
 | |
|           {
 | |
|             loader: "ts-loader",
 | |
|             options: {
 | |
|               transpileOnly: true,
 | |
|               configFile: path.resolve(__dirname, "../tsconfig.prod.json"),
 | |
|             },
 | |
|           },
 | |
|           {
 | |
|             loader: "babel-loader",
 | |
| 
 | |
|             options: {
 | |
|               presets: [
 | |
|                 "@babel/preset-env",
 | |
|                 ["@babel/preset-react", { runtime: "automatic" }],
 | |
|                 "@babel/preset-typescript",
 | |
|               ],
 | |
|               plugins: [["@babel/plugin-transform-runtime"]],
 | |
|             },
 | |
|           },
 | |
|         ],
 | |
|       },
 | |
|     ],
 | |
|   },
 | |
|   plugins: [
 | |
|     new webpack.optimize.LimitChunkCountPlugin({
 | |
|       maxChunks: 1,
 | |
|     }),
 | |
|     ...(process.env.ANALYZER === "true" ? [new BundleAnalyzerPlugin()] : []),
 | |
|   ],
 | |
| };
 |