Skip to content

Commit

Permalink
add webpack
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
  • Loading branch information
ohltyler committed Sep 21, 2023
1 parent 9c192a3 commit b090bdf
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 b090bdf

Please sign in to comment.