Here is a repo isolating what I am having a problem with: Īnd here is this repo hosted on Netlify: It seems to be bigger than the other files while being similar in code size, but maybe swiper is included in there. In my logs below, the page in question is test.svelte. It is worth noting that the error does not show when navigating to the page with the nav. netlify directory created by the netlify adapter, it uses requires. ![]() when using the dev command) it is all built with imports. It looks to me that the difference is that in the build directory (i.e. Instead change the require of in /var/task/.netlify/server/entries/pages/ to a dynamic import() which is available in all CommonJS modules.Įrror : require() of ES Module /var/task/node_modules/ssr-window/ from /var/task/.netlify/server/entries/pages/ not supported.Īs far as I can tell ssr-window is a dependency of Swiper. Require() of ES Module /var/task/node_modules/ssr-window/ from /var/task/.netlify/server/entries/pages/ not supported.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |