@@ -8,6 +8,7 @@ var linker = require('./linker.js');
8
8
var util = require ( 'util' ) ;
9
9
var _ = require ( 'underscore' ) ;
10
10
var Profile = require ( '../tool-env/profile.js' ) . Profile ;
11
+ import assert from "assert" ;
11
12
import { sha1 , readAndWatchFileWithHash } from '../fs/watch.js' ;
12
13
import LRU from 'lru-cache' ;
13
14
import { sourceMapLength } from '../utils/utils.js' ;
@@ -1124,11 +1125,12 @@ export class PackageSourceBatch {
1124
1125
const appFilesWithoutNodeModules = [ ] ;
1125
1126
1126
1127
outputFiles . forEach ( file => {
1127
- const parts = file . installPath . split ( "/" ) ;
1128
+ const parts = file . absModuleId . split ( "/" ) ;
1129
+ assert . strictEqual ( parts [ 0 ] , "" ) ;
1128
1130
const nodeModulesIndex = parts . indexOf ( "node_modules" ) ;
1129
1131
1130
- if ( nodeModulesIndex === - 1 || ( nodeModulesIndex === 0 &&
1131
- parts [ 1 ] === "meteor" ) ) {
1132
+ if ( nodeModulesIndex === - 1 || ( nodeModulesIndex === 1 &&
1133
+ parts [ 2 ] === "meteor" ) ) {
1132
1134
appFilesWithoutNodeModules . push ( file ) ;
1133
1135
} else {
1134
1136
// This file is going to be installed in a node_modules
@@ -1308,10 +1310,11 @@ export class PackageSourceBatch {
1308
1310
files : jsResources . map ( ( inputFile ) => {
1309
1311
fileHashes . push ( inputFile . hash ) ;
1310
1312
return {
1311
- installPath : inputFile . installPath ,
1313
+ absModuleId : inputFile . absModuleId ,
1312
1314
sourceMap : ! ! inputFile . sourceMap ,
1313
1315
mainModule : inputFile . mainModule ,
1314
1316
imported : inputFile . imported ,
1317
+ alias : inputFile . alias ,
1315
1318
lazy : inputFile . lazy ,
1316
1319
bare : inputFile . bare ,
1317
1320
} ;
0 commit comments