Skip to content

Commit

Permalink
fix: externalize known css types during dep-prebundling
Browse files Browse the repository at this point in the history
fix #1695
  • Loading branch information
yyx990803 committed Jan 25, 2021
1 parent 6cd2d35 commit 02a0324
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/vite/src/node/optimizer/esbuildDepPlugin.ts
Expand Up @@ -7,7 +7,19 @@ import { deepImportRE, isBuiltin, isRunningWithYarnPnp } from '../utils'
import { tryNodeResolve } from '../plugins/resolve'
import { PluginContainer } from '../server/pluginContainer'

const externalTypes = ['css', 'vue', 'svelte', ...knownAssetTypes]
const externalTypes = [
'css',
// supported pre-processor types
'less',
'sass',
'scss',
'style',
'stylus',
// known SFC types
'vue',
'svelte',
...knownAssetTypes
]

export function esbuildDepPlugin(
qualified: Record<string, string>,
Expand Down

0 comments on commit 02a0324

Please sign in to comment.