unplugin / unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup
MIT License
3.26k stars 199 forks source link

Extract imports with build #420

Open ws-rush opened 1 year ago

ws-rush commented 1 year ago

Clear and concise description of the problem

depend on vite-react example.

auto-imports extract imports in dev mode only npm run dev but not in build, also icons need to open page in browser then it will generate it, in pipeline I should run dev, open page to generate icons then build.

Suggested solution

make it extract imports in dev and build modes, also icons should be generated without need to open page in browser.

Alternative

No response

Additional context

No response

Validations

trry-hub commented 3 months ago

There is a problem on my end. I used Jenkins, who is responsible for packaging, but the component.d.ts file on Jenkins was modified during packaging, which caused me to be unable to publish properly next time. I must ignore it before continuing. Can you add a configuration to compile component.d.ts files during packaging