mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: introduce font picker (#8012)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
4c5408263c
commit
62228e0bbb
120 changed files with 3390 additions and 1106 deletions
|
@ -1,6 +1,8 @@
|
|||
const { build } = require("esbuild");
|
||||
const { sassPlugin } = require("esbuild-sass-plugin");
|
||||
const { externalGlobalPlugin } = require("esbuild-plugin-external-global");
|
||||
const { woff2BrowserPlugin } = require("./woff2/woff2-esbuild-plugins");
|
||||
|
||||
// Will be used later for treeshaking
|
||||
//const fs = require("fs");
|
||||
// const path = require("path");
|
||||
|
@ -43,16 +45,13 @@ const browserConfig = {
|
|||
format: "esm",
|
||||
plugins: [
|
||||
sassPlugin(),
|
||||
woff2BrowserPlugin(),
|
||||
externalGlobalPlugin({
|
||||
react: "React",
|
||||
"react-dom": "ReactDOM",
|
||||
}),
|
||||
],
|
||||
splitting: true,
|
||||
loader: {
|
||||
".woff2": "copy",
|
||||
".ttf": "copy",
|
||||
},
|
||||
};
|
||||
const createESMBrowserBuild = async () => {
|
||||
// Development unminified build with source maps
|
||||
|
@ -61,6 +60,7 @@ const createESMBrowserBuild = async () => {
|
|||
outdir: "dist/browser/dev",
|
||||
sourcemap: true,
|
||||
chunkNames: "excalidraw-assets-dev/[name]-[hash]",
|
||||
assetNames: "excalidraw-assets-dev/[name]-[hash]",
|
||||
define: {
|
||||
"import.meta.env": JSON.stringify({ DEV: true }),
|
||||
},
|
||||
|
@ -72,6 +72,7 @@ const createESMBrowserBuild = async () => {
|
|||
outdir: "dist/browser/prod",
|
||||
minify: true,
|
||||
chunkNames: "excalidraw-assets/[name]-[hash]",
|
||||
assetNames: "excalidraw-assets/[name]-[hash]",
|
||||
define: {
|
||||
"import.meta.env": JSON.stringify({ PROD: true }),
|
||||
},
|
||||
|
@ -99,11 +100,8 @@ const rawConfig = {
|
|||
entryPoints: ["index.tsx"],
|
||||
bundle: true,
|
||||
format: "esm",
|
||||
plugins: [sassPlugin()],
|
||||
|
||||
plugins: [sassPlugin(), woff2BrowserPlugin()],
|
||||
loader: {
|
||||
".woff2": "copy",
|
||||
".ttf": "copy",
|
||||
".json": "copy",
|
||||
},
|
||||
packages: "external",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue