d6cd8b78f1
* feat: decouple package deps and introduce yarn workspaces * update root directory * fix * fix scripts * fix lint * update path in scripts * remove yarn.lock files from packages * ignore workspace * dummy * dummy * remove comment check * revert workflow changes * ignore ws when installing gh actions * remove log * update path * fix * fix typo
33 lines
837 B
JavaScript
33 lines
837 B
JavaScript
const prodConfig = require("./webpack.prod.config");
|
|
const devConfig = require("./webpack.dev.config");
|
|
|
|
const isProd = process.env.NODE_ENV === "production";
|
|
|
|
const config = isProd ? prodConfig : devConfig;
|
|
const outputFile = isProd
|
|
? "excalidraw-with-preact.production.min"
|
|
: "excalidraw-with-preact.development";
|
|
|
|
const preactWebpackConfig = {
|
|
...config,
|
|
entry: {
|
|
[outputFile]: "./entry.js",
|
|
},
|
|
externals: {
|
|
...config.externals,
|
|
"react-dom/client": {
|
|
root: "ReactDOMClient",
|
|
commonjs2: "react-dom/client",
|
|
commonjs: "react-dom/client",
|
|
amd: "react-dom/client",
|
|
},
|
|
"react/jsx-runtime": {
|
|
root: "ReactJSXRuntime",
|
|
commonjs2: "react/jsx-runtime",
|
|
commonjs: "react/jsx-runtime",
|
|
amd: "react/jsx-runtime",
|
|
},
|
|
},
|
|
};
|
|
module.exports = preactWebpackConfig;
|