You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have some flow call apps,such as @foo/bar, it build to public/apps/@foo/bar by vite.build foreach app,and copy to @foo/bar/dist when publish,and copy back to /public when postinstall,called by systemjs as amd lib,so we can shared apps in hundreds of project.
but, the assertDir is not work when we build them to apps/...,it build in the lib as base64,as a large lib.
Suggested solution
now, i hack the rollupOptions and vite:asset plugin to build the assets and chunks right with a env.appname in every build iteration. it not a elegant method but it work.
This discussion was converted from issue #13611 on June 25, 2023 09:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
in doc. , it say that lib mode the
assertDir
andassetsInlineLimit
do not take effect. with: https://cn.vitejs.dev/config/build-options.html#build-assetsdirand then i found the code changed in : c976d10
we have some flow call
apps
,such as@foo/bar
, it build topublic/apps/@foo/bar
byvite.build
foreach app,and copy to@foo/bar/dist
when publish,and copy back to/public
when postinstall,called bysystemjs
asamd lib
,so we can sharedapps
in hundreds of project.but, the
assertDir
is not work when we build them toapps/...
,it build in the lib asbase64
,as a large lib.Suggested solution
rollupOptions
andvite:asset
plugin to build theassets
andchunks
right with aenv.appname
in every build iteration. it not a elegant method but it work.so
assertDir
not work ? some design considerations?assetsInlineLimit
,also can make the lib assert inline,so we can controll by ourself.Alternative
No response
Additional context
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions