Skip to content

Commit a32d290

Browse files
committed
fixed vite/ssr error on build
see sveltejs/kit#928 ``` Named export 'faAsterisk' not found. The requested module '@fortawesome/free-solid-svg-icons' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from '@fortawesome/free-solid-svg-icons'; const { faArrowLeft, faArrowRight, faAsterisk, faArrowRotateLeft, faFolderPlus, faEllipsis } = pkg; ```
1 parent a4bf256 commit a32d290

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

svelte.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ const config = {
2727
'/build',
2828
]
2929
})
30-
]
30+
],
31+
ssr: {
32+
noExternal: [ '@fortawesome/free-solid-svg-icons' ]
33+
},
3134
},
3235
adapter: adapter({
3336
pages: 'docs',

0 commit comments

Comments
 (0)