Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
fix: detect symlinks added to node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jul 22, 2018
1 parent 2efa9a7 commit ac43577
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Bundle/Package.coffee
Expand Up @@ -5,9 +5,12 @@ cush = require 'cush'
path = require 'path'
wch = require 'wch'

nodeModuleGlobs = ['/node_modules/*', '/node_modules/@*/*']
nodeModuleGlobs.forEach (glob) ->
nodeModuleGlobs.push glob + '/package.json'

nodeModulesExpr = wch.expr
only: ['/node_modules/*/package.json', '/node_modules/@*/*/package.json']
type: 'f'
only: nodeModuleGlobs

class Package
constructor: (@path, data) ->
Expand Down Expand Up @@ -169,8 +172,10 @@ class Package
@bundle._rebuild() if @missedPackage
return

if /\.json$/.test evt.name
evt.name = path.dirname evt.name

# Skip unused packages.
evt.name = path.dirname evt.name
return if !asset = @assets[evt.name]

# Skip packages with unchanged name/version.
Expand Down

0 comments on commit ac43577

Please sign in to comment.