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

assets of dynamic remotes #171

Open
Pong420 opened this issue Oct 29, 2024 · 0 comments
Open

assets of dynamic remotes #171

Pong420 opened this issue Oct 29, 2024 · 0 comments

Comments

@Pong420
Copy link

Pong420 commented Oct 29, 2024

i have a dynamic remote using vite. it will be host by a domain different from the host. The following is the exposed component

import heart from '@/assets/heart.png';

export default function Entry() {
  return (
    <div>
      <img src={heart} alt="" />
    </div>
  );
}

The output structure

dist/
├── assets
│   ├── ...
│   ├── heart-B7sPXKnk.png
│   ├── index-lGpEGtzZ.js
│   └── virtualExposes-DrUcl4CE.js
├── favicon.ico
├── index.html
└── remoteEntry.js

The value of heart will be /assets/heart-B7sPXKnk.png. I can load can load the remote with http://localhost:4173/remoteEntry.js

How can i know the domain of remoteEntry.js is http://localhost:4173/ or any other domain ? any function/variable like __webpack_public_path__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant