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

[Feature]: Support asset module #570

Open
2 of 6 tasks
SoonIter opened this issue Dec 17, 2024 · 3 comments
Open
2 of 6 tasks

[Feature]: Support asset module #570

SoonIter opened this issue Dec 17, 2024 · 3 comments

Comments

@SoonIter
Copy link
Member

SoonIter commented Dec 17, 2024

What problem does this feature solve?

Support asset module based on publicPath: 'auto'

Bundle

Bundleless

final

  • Rslib: set output.publicPath: 'auto' by default for esm/cjs format

What does the proposed API look like?

input

└── src
    ├── assets
    │   └── react.svg   // <--
    └── index.tsx
// index.tsx
import foo from './assets/react.svg';
console.log(foo);

output

./dist
└── esm
    ├── assets
    │   └── react.mjs     // <--
    ├── static/svg
    │   └── react.svg     // <--
    ├── index.d.ts
    └── index.mjs
// dist/esm/assets/react.mjs
import url from '../static/svg/react.svg';
export default url;
// dist/esm/index.mjs
import foo from './assets/react.mjs';
console.log(foo);
@noshower
Copy link

When wil this feature be released?

@Timeless0911
Copy link
Collaborator

When wil this feature be released?

There's no exact time. Check this issue to track.

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

No branches or pull requests

3 participants