Skip to content

Commit

Permalink
revert: vite-node auto-inline, fix #353
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 2, 2022
1 parent 2c3981c commit edf46b3
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions packages/histoire/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,6 @@ export async function processConfig (config: HistoireConfig, mode: ConfigMode):
}

export async function processDefaultConfig (defaultConfig: HistoireConfig, preUserConfig: HistoireConfig, mode: ConfigMode, cwd: string): Promise<HistoireConfig> {
// Automatically inline dependencies in vite-node
const pkgFile = await findUp(cwd, ['package.json'])
const fs = (await import('fs-extra')).default
if (pkgFile) {
const pkg = await fs.readJSON(pkgFile)
if (pkg.dependencies) {
defaultConfig.viteNodeInlineDeps = Object.keys(pkg.dependencies).map(d => new RegExp(d))
}
}

// Apply plugins
for (const plugin of [...defaultConfig.plugins, ...preUserConfig.plugins ?? []]) {
if (plugin.defaultConfig) {
Expand Down

0 comments on commit edf46b3

Please sign in to comment.