Skip to content

Commit

Permalink
fix: add tailwind to dep optimization ignore list
Browse files Browse the repository at this point in the history
fix #146
  • Loading branch information
yyx990803 committed May 14, 2020
1 parent 36a24aa commit fc7b978
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node/depOptimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { init, parse } from 'es-module-lexer'
import chalk from 'chalk'
import { Ora } from 'ora'

const KNOWN_IGNORE_LIST = new Set(['tailwindcss'])

export const OPTIMIZE_CACHE_DIR = `node_modules/.vite_opt_cache`

export interface OptimizeOptions extends ResolvedConfig {
Expand Down Expand Up @@ -75,6 +77,9 @@ export async function optimizeDeps(config: OptimizeOptions, asCommand = false) {
// (i.e. esm that imports its own dependencies, e.g. styled-components)
await init
const qualifiedDeps = deps.filter((id) => {
if (KNOWN_IGNORE_LIST.has(id)) {
return false
}
const entry = resolveNodeModuleEntry(root, id)
if (!entry) {
return false
Expand Down

0 comments on commit fc7b978

Please sign in to comment.