Skip to content

Commit

Permalink
test with esm
Browse files Browse the repository at this point in the history
Signed-off-by: ravi_kumar_pilla <[email protected]>
  • Loading branch information
ravi-kumar-pilla committed Feb 6, 2025
1 parent 0485f45 commit 508beaa
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 50 deletions.
87 changes: 44 additions & 43 deletions demo-project/viz_jupyter_test.ipynb

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions esm/c54c291378db909c0f7c.worker.js

This file was deleted.

2 changes: 2 additions & 0 deletions esm/d1fbb23f3ade3692e5ec.worker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion esm/kedro-viz.production.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package/kedro_viz/launchers/notebook_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def show(self, pipeline: Pipeline, catalog: DataCatalog = None, options: Dict[st
import React from "react";
import { createRoot } from "react-dom/client";
import lodash from "lodash";
import KedroViz from "http://localhost:8003/kedro-viz.production.mjs";
import KedroViz from "http://localhost:8003/kedro-viz.production.min.mjs";
const viz_container = document.getElementById('kedro-viz-""" + unique_id + """');
Expand Down
21 changes: 18 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');

// Bundle and inline web-workers
module.exports = {
mode: 'production', // Production mode
mode: 'production', // Ensures optimizations for production by default
entry: {
"kedro-viz": './src/components/app/index', // Entry point for KedroViz
"kedro-viz": './src/components/app/index',
},
output: {
path: path.resolve(__dirname, 'esm'),
Expand Down Expand Up @@ -43,4 +43,19 @@ module.exports = {
},
],
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
compress: {
drop_console: true, // Removes console logs
},
output: {
comments: false, // Remove comments
},
},
}),
],
},
};

0 comments on commit 508beaa

Please sign in to comment.