Skip to content

Commit

Permalink
fix: add boolean flag to bypass svelte.config.js check when not needed (
Browse files Browse the repository at this point in the history
  • Loading branch information
gengns authored Jul 27, 2024
1 parent a0cfc50 commit 434a320
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createFilter } from '@rollup/pluginutils';
import MagicString from 'magic-string';
import { createMapping, walkAST, prependTo, normalizePath, makeArray } from './lib.js';

export default function autoImport({ components, module, mapping, include, exclude } = {}) {
export default function autoImport({ components, module, mapping, include, exclude, configFile = true } = {}) {
if (!include) {
include = ['**/*.svelte'];
}
Expand Down Expand Up @@ -90,6 +90,7 @@ export default function autoImport({ components, module, mapping, include, exclu
...plugins.slice(indexPluginSvelte + 1)
];
}
if (!configFile) return;
try {
let dirname = path.dirname(fileURLToPath(import.meta.url));
let relative = path.relative(dirname, config.inlineConfig.root || config.root);
Expand Down

0 comments on commit 434a320

Please sign in to comment.