build: Welcome ESM and Bye Bye UMD (#7441)

* build: Welcome ESM and Bye Bye UMD

* remove package

* create unbundled esm build

* update script for example

* fix typo

* dummy commit

* update autorelease script to build esm

* revert dummy commit

* move react, react-dom and testing library to dev dependencies

* remove entry.js, publicPath and yarn install:deps script

* fix

* upgrade esbuild to fix glob import error for locales

* remove webpack chunk names as thats not needed anymore

* marking the code sideeffects free

* make the library tree-shakeable and move fonts to fonts directory

* allow side effects for css, scss files

* remove tree-shaking

* comment code for tree shaking

* move to vite for example

* bye bye webpack

* ignore ts

* separate build and output dir

* use esbuild for creating bundle for example

* update output dir

* lint

* create browser dev build with source maps and prod with minification

* add dev and prod builds for bundler

* lint

* update script

* remove await

* load prod build

* create minified build in dist

* prod and dev builds using export field

* remove import.meta

* dummy

* define import.meta prod and dev

* fix

* export types

* add types field

* typo

* lint

* Update scripts/buildPackage.js

* move types inside export

* newline
This commit is contained in:
Aakansha Doshi
2024-01-01 20:18:44 +05:30
committed by GitHub
parent e6c3c06c2e
commit a8064ba3ee
88 changed files with 511 additions and 1335 deletions
-1
View File
@@ -594,7 +594,6 @@ class App extends React.Component<AppProps, AppState> {
};
this.id = nanoid();
this.library = new Library(this);
this.actionManager = new ActionManager(
this.syncActionResult,
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.Avatar {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.Card {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.Checkbox {
@@ -1,4 +1,4 @@
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
.excalidraw {
.focus-visible-none {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.confirm-dialog {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.context-menu {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.Dialog {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.ExportDialog__preview {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.ExcButton {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.FixedSideContainer {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.HelpDialog {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
// this is loosely based on the longest hint text
$wide-viewport-width: 1000px;
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.picker-container {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
--ImageExportModal-preview-border: #d6d6d6;
+1 -1
View File
@@ -1,5 +1,5 @@
@import "open-color/open-color";
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.layer-ui__wrapper.animate {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.library-unit {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
&.excalidraw-modal-container {
@@ -1,4 +1,4 @@
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
.excalidraw {
.OverwriteConfirm {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.PasteChartDialog {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.publish-library {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
--RadioGroup-background: var(--island-bg-color);
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.ShareableLinkDialog {
@@ -1,5 +1,5 @@
@import "open-color/open-color";
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
.excalidraw {
.sidebar {
@@ -1,4 +1,4 @@
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
.excalidraw {
.sidebar-trigger {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.Stats {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
--Switch-disabled-color: var(--color-border-outline);
@@ -1,4 +1,4 @@
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
$verticalBreakpoint: 861px;
@@ -207,9 +207,7 @@ export const TTDDialogBase = withInternalFallback(
const [mermaidToExcalidrawLib, setMermaidToExcalidrawLib] =
useState<MermaidToExcalidrawLibProps>({
loaded: false,
api: import(
/* webpackChunkName:"mermaid-to-excalidraw" */ "@excalidraw/mermaid-to-excalidraw"
),
api: import("@excalidraw/mermaid-to-excalidraw"),
});
useEffect(() => {
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
--ExcTextField--color: var(--color-on-surface);
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.TextInput {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.Toast {
+1 -1
View File
@@ -1,5 +1,5 @@
@import "open-color/open-color.scss";
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.ToolIcon {
+1 -1
View File
@@ -1,5 +1,5 @@
@import "open-color/open-color.scss";
@import "../css/variables.module";
@import "../css/variables.module.scss";
.excalidraw {
.App-toolbar {
+1 -1
View File
@@ -1,4 +1,4 @@
@import "../css/variables.module";
@import "../css/variables.module.scss";
// container in body where the actual tooltip is appended to
.excalidraw-tooltip {
@@ -1,4 +1,4 @@
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
.excalidraw {
.dropdown-menu {
@@ -1,4 +1,4 @@
@import "../../css/variables.module";
@import "../../css/variables.module.scss";
.excalidraw {
.collab-button {