Excalidraw export (#2246)

This commit is contained in:
Guillaume Grossetie 2020-11-02 20:14:20 +01:00 committed by GitHub
parent 58861e87e5
commit a7da8901d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 6250 additions and 10 deletions

View file

@ -0,0 +1,40 @@
const webpack = require("webpack");
const path = require("path");
module.exports = {
mode: "production",
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
optimization: {
runtimeChunk: false,
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "excalidraw-utils.min.js",
library: "ExcalidrawUtils",
libraryTarget: "umd",
},
entry: "./index.js",
module: {
rules: [
{
test: /\.(ts|tsx|js)$/,
use: [
{
loader: "ts-loader",
options: {
transpileOnly: true,
configFile: path.resolve(__dirname, "../tsconfig.prod.json"),
},
},
],
},
],
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
};