mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-11-02 03:25:53 +01:00
fix: umd build so it can be used in browser (#7349)
* fix: umd build so it can be used in browser * fix lint * increase size limit * update changelog * use json.stringify for env preact variable so its accessible as string * update changelog
This commit is contained in:
parent
f53edb7437
commit
207a0bcc6e
@ -39,7 +39,7 @@ Since Vite removes env variables by default, you can update the vite config to e
|
||||
|
||||
```
|
||||
define: {
|
||||
"process.env.IS_PREACT": process.env.IS_PREACT,
|
||||
"process.env.IS_PREACT": JSON.stringify("true"),
|
||||
},
|
||||
```
|
||||
|
||||
|
@ -93,7 +93,7 @@ Since Vite removes env variables by default, you can update the vite config to e
|
||||
|
||||
```
|
||||
define: {
|
||||
"process.env.IS_PREACT": process.env.IS_PREACT,
|
||||
"process.env.IS_PREACT": JSON.stringify("true"),
|
||||
},
|
||||
```
|
||||
:::
|
||||
|
@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"path": "dist/excalidraw.production.min.js",
|
||||
"limit": "325 kB"
|
||||
"limit": "335 kB"
|
||||
},
|
||||
{
|
||||
"path": "dist/excalidraw-assets/locales",
|
||||
|
@ -11,6 +11,22 @@ The change should be grouped under one of the below section and must contain PR
|
||||
Please add the latest change on the top under the correct section.
|
||||
-->
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixes
|
||||
|
||||
- Umd build for browser since it was breaking in v0.17.0 [#7349](https://github.com/excalidraw/excalidraw/pull/7349). Also make sure that when using `Vite`, the `process.env.IS_PREACT` is set as `"true"` (string) and not a boolean.
|
||||
|
||||
```
|
||||
define: {
|
||||
"process.env.IS_PREACT": JSON.stringify("true"),
|
||||
}
|
||||
```
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- `appState.openDialog` type was changed from `null | string` to `null | { name: string }`. [#7336](https://github.com/excalidraw/excalidraw/pull/7336)
|
||||
|
||||
## 0.17.0 (2023-11-14)
|
||||
|
||||
### Features
|
||||
|
@ -1,5 +1,3 @@
|
||||
const { merge } = require("webpack-merge");
|
||||
|
||||
const prodConfig = require("./webpack.prod.config");
|
||||
const devConfig = require("./webpack.dev.config");
|
||||
|
||||
@ -11,6 +9,7 @@ const outputFile = isProd
|
||||
: "excalidraw-with-preact.development";
|
||||
|
||||
const preactWebpackConfig = {
|
||||
...config,
|
||||
entry: {
|
||||
[outputFile]: "./entry.js",
|
||||
},
|
||||
@ -30,4 +29,4 @@ const preactWebpackConfig = {
|
||||
},
|
||||
},
|
||||
};
|
||||
module.exports = merge(config, preactWebpackConfig);
|
||||
module.exports = preactWebpackConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user