build: support preact 🥳 (#7255)

* build: support preact

* add log

* Simplify the config and generate prod and dev builds for preact

* update changelog

* remove logs

* use env variable so its available during build time

* update cl

* fix
This commit is contained in:
Aakansha Doshi
2023-11-13 16:18:36 +05:30
committed by GitHub
parent ceb255e8ee
commit adfd95be33
4 changed files with 53 additions and 2 deletions

View File

@@ -1,4 +1,10 @@
if (process.env.NODE_ENV === "production") {
if (process.env.IS_PREACT === "true") {
if (process.env.NODE_ENV === "production") {
module.exports = require("./dist/excalidraw-with-preact.production.min.js");
} else {
module.exports = require("./dist/excalidraw-with-preact.development.js");
}
} else if (process.env.NODE_ENV === "production") {
module.exports = require("./dist/excalidraw.production.min.js");
} else {
module.exports = require("./dist/excalidraw.development.js");