vite icon indicating copy to clipboard operation
vite copied to clipboard

feat: v1.0.0

Open gioboa opened this issue 1 year ago • 3 comments

features:

  • based on Module Federation 2 via @module-federation/runtime library

gioboa avatar Aug 04 '24 19:08 gioboa

We can test the package with this alpha version 1.0.0-alpha-7c3ba59

gioboa avatar Aug 05 '24 16:08 gioboa

@gioboa can we enable discussions section in this repo and also to make it easy would be great if you could give some moderation rights so I could help with triaging issues

husayt avatar Aug 07 '24 11:08 husayt

I made a simple repro to test this case. Will try to commit that later. But gist of it I added another remote with with these dependencies

  "dependencies": {
    "@module-federation/vite": "workspace:*",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "vue": "^3.4.29",
    "vue-router": "^4.4.0",
    "ag-grid-community": "^30.2.0",
    "ag-grid-react": "^30.2.0"
  },

and AgGridDemo.jsx

import 'ag-grid-community/styles/ag-grid.css';
import 'ag-grid-community/styles/ag-theme-alpine.css';
import { AgGridReact } from 'ag-grid-react';
import { useState } from 'react';


export const AgGridDemo = ({  }) => {
  const [rowData] = useState([
    { make: 'Toyota', model: 'Celica', price: 35000 },
    { make: 'Ford', model: 'Mondeo', price: 32000 },
    { make: 'Porsche', model: 'Boxter', price: 72000 },
  ]);

  const [columnDefs] = useState([{ field: 'make' }, { field: 'model' }, { field: 'price' }]);

  return (
    <div className="App">
      <div style={{ display: 'flex', flexDirection: 'row' }}>
        <div
          id="grid1"
          className="ag-theme-alpine"
          style={{ height: 400, width: 600, margin: '20px' }}
        >
          <AgGridReact rowData={rowData} columnDefs={columnDefs}></AgGridReact>
        </div>
        <div
          id="grid2"
          className="ag-theme-alpine"
          style={{ height: 400, width: 600, margin: '20px' }}
        >
          <AgGridReact rowData={rowData} columnDefs={columnDefs}></AgGridReact>
        </div>
      </div>
    </div>
  );
};

When running this remote on its own all works fine.

But when I try to run it from another host via MF I get the same error

Object.useRef (chunk-D5PPDA7K.js:1074:29)
    at AgGridReactUi (ag-grid-react.js:69725:36)
    at renderWithHooks (chunk-BISVECJP.js:11548:26)
    at mountIndeterminateComponent (chunk-BISVECJP.js:14926:21)
    at beginWork (chunk-BISVECJP.js:15914:22)
    at HTMLUnknownElement.callCallback2 (chunk-BISVECJP.js:3674:22)
    at Object.invokeGuardedCallbackDev (chunk-BISVECJP.js:3699:24)
    at invokeGuardedCallback (chunk-BISVECJP.js:3733:39)
    at beginWork$1 (chunk-BISVECJP.js:19765:15)
    at performUnitOfWork (chunk-BISVECJP.js:19198:20)

husayt avatar Aug 07 '24 15:08 husayt

I'm excited to see this version 1.0.0 released. Thank you for this initiative. Is the current version sufficiently mature to be tested?

nicotu01 avatar Aug 30 '24 05:08 nicotu01

About 10 issues have been resolved in the past month, and there is only one bug #68 left which will be fixed soon You can try, new-config branch pnpm install && pnpm run dev && pnpm run dev-vv

zhangHongEn avatar Aug 30 '24 05:08 zhangHongEn

We are building a new alpha release after every fix too. You can use that if you want

https://www.npmjs.com/package/@module-federation/vite/v/1.0.0-alpha-661e052?activeTab=versions

Screenshot_20240830-124003.jpg

gioboa avatar Aug 30 '24 10:08 gioboa

This implementation is so great and it's working fine. I'll merge this PR inside main.

gioboa avatar Sep 15 '24 11:09 gioboa