Skip to content

Commit b2acee1

Browse files
authored
fix: allow strings for svelte node in config file (#26)
This fixes issue #18.
1 parent 944e701 commit b2acee1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

loadConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ exports.load = async function load({ config, options, logger }) {
2828
const { contents } = configFile;
2929
const isDynamic = path.extname(configFile.filePath) === '.js';
3030

31-
if (typeof contents !== 'object') {
32-
throw new Error('Svelte config should be an object.');
31+
if (typeof contents !== 'object' && typeof contents !== 'string') {
32+
throw new Error('Svelte config should be an object or a string.');
3333
}
3434

3535
if (isDynamic) {

0 commit comments

Comments
 (0)