Skip to content

Commit

Permalink
Update optimizer webpack config to support ReactFlow dependency (#4882)
Browse files Browse the repository at this point in the history
* Add reactflow with compiler fix

Signed-off-by: Tyler Ohlsen <[email protected]>

* Update CHANGELOG

Signed-off-by: Tyler Ohlsen <[email protected]>

* Update comment

Signed-off-by: Tyler Ohlsen <[email protected]>

* Revert adding reactflow dep

Signed-off-by: Tyler Ohlsen <[email protected]>

---------

Signed-off-by: Tyler Ohlsen <[email protected]>
Co-authored-by: Miki <[email protected]>
  • Loading branch information
ohltyler and AMoo-Miki authored Sep 22, 2023
1 parent a10f1c7 commit eec3ed7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/osd-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,21 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker:
},
},
},
{
test: /\.js$/,
/* reactflow and some of its dependencies don't have es5 builds
* so we need to build from source and transpile for webpack v4
*/
include: /node_modules[\\/]@?reactflow/,
use: {
loader: 'babel-loader',
options: {
babelrc: false,
envName: worker.dist ? 'production' : 'development',
presets: [BABEL_PRESET_PATH],
},
},
},
{
test: /\.(html|md|txt|tmpl)$/,
use: {
Expand Down

0 comments on commit eec3ed7

Please sign in to comment.