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
fix: replace relative-require with our own resolveDependencyData (#254)
* fix: replace relative-require with our own resolveDependencyData to avoid errors when package.json isn't exported
* feat: implement simple cache for resolved svelte fields
* ci: use windows-2019 label to see if windows fail is caused by new github default
* ci: remove esbuild install calls, relax timeouts for ci and windows, add logging to globalSetup
* chore: add changeset
log.debug(`resolveId resolved ${resolved} via package.json svelte field of ${importee}`);
143
143
returnresolved;
144
144
}
145
145
}catch(err){
146
-
switch(err.code){
147
-
case'ERR_PACKAGE_PATH_NOT_EXPORTED':
148
-
pkg_export_errors.add(importee);
149
-
returnnull;
150
-
case'MODULE_NOT_FOUND':
151
-
returnnull;
152
-
default:
153
-
throwerr;
154
-
}
146
+
pkg_resolve_errors.add(importee);
155
147
}
156
148
},
157
149
@@ -206,10 +198,11 @@ export function svelte(inlineOptions?: Partial<Options>): Plugin {
206
198
*/
207
199
// TODO generateBundle isn't called by vite, is buildEnd enough or should it be logged once per violation in resolve
208
200
buildEnd(){
209
-
if(pkg_export_errors.size>0){
201
+
if(pkg_resolve_errors.size>0){
210
202
log.warn(
211
-
`The following packages did not export their \`package.json\` file so we could not check the "svelte" field. If you had difficulties importing svelte components from a package, then please contact the author and ask them to export the package.json file.`,
0 commit comments