Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update optimizer webpack config to support ReactFlow dependency #4882

Merged
merged 7 commits into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/,
ohltyler marked this conversation as resolved.
Show resolved Hide resolved
use: {
loader: 'babel-loader',
options: {
babelrc: false,
envName: worker.dist ? 'production' : 'development',
presets: [BABEL_PRESET_PATH],
},
},
},
{
test: /\.(html|md|txt|tmpl)$/,
use: {
Expand Down
Loading