dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

Plugins not loaded

Open bradlis7 opened this issue 1 year ago • 3 comments

Sorry to be a bother again, but now I've loaded dayOfYear plugin, but it's not resolved. I don't get any error, it just doesn't work. I think because you switched to look for ${plugin}/index.js: https://github.com/nathanchase/dayjs/commit/7e48c97e6841f0e78ea211ec0d73c5f8787c029a#diff-93479c5e7e91bcb11c80b7dcd9f114294034fa5443fc0609473721fa6c2c5c88

However, dayjs is still compiled down to ${plugin}.js: https://www.npmjs.com/package/dayjs?activeTab=code (I can't link to /dayjs/plugins dir in this UI).

bradlis7 avatar Apr 11 '23 17:04 bradlis7

Would removing "/index.js" would make it look for both directory and .js file to import in both cases?

bradlis7 avatar Apr 11 '23 17:04 bradlis7

Reproduction: https://stackblitz.com/edit/github-ddmvge?file=app.vue

bradlis7 avatar Apr 12 '23 20:04 bradlis7

@bradlis7, I cloned your reproduction locally and made the plugin work. I don't know what exactly did it, but I used npx nuxi upgrade and switched to yarn ...

riddla avatar Apr 28 '23 13:04 riddla