feat: using swc as transpiler

This commit is contained in:
2024-02-21 02:01:35 +07:00
parent 37df5c40cf
commit 4d1c56d6d8
34 changed files with 1912 additions and 434 deletions
+18
View File
@@ -0,0 +1,18 @@
if (window.parent !== window) {
const _log = console.log;
const _error = console.error;
const _warn = console.warn;
console.log = function (...args) {
parent.window.postMessage({ type: "log", args: args }, "*");
_log(...args);
};
console.error = function (...args) {
parent.window.postMessage({ type: "error", args: args }, "*");
_error(...args);
};
console.warn = function (...args) {
parent.window.postMessage({ type: "warn", args: args }, "*");
_warn(...args);
};
}