Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(rollup): removing rollup metadata prefix for paths
Browse files Browse the repository at this point in the history
removing rollup metadata prefix for paths
  • Loading branch information
danbucholtz committed Nov 10, 2016
1 parent 0685c0b commit 350a288
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BuildContext, BuildState, TaskInfo } from './util/interfaces';
import { BuildError, Logger } from './util/logger';
import { fillConfigDefaults, generateContext, getUserConfigFile, replacePathVars } from './util/config';
import { ionCompiler } from './plugins/ion-compiler';
import { join, isAbsolute, normalize } from 'path';
import { join, isAbsolute, normalize, sep } from 'path';
import * as rollupBundler from 'rollup';


Expand Down Expand Up @@ -82,7 +82,14 @@ export function rollupWorker(context: BuildContext, configFile: string): Promise

// set the module files used in this bundle
// this reference can be used elsewhere in the build (sass)
context.moduleFiles = bundle.modules.map((m) => m.id);
context.moduleFiles = bundle.modules.map((m) => {
// sometimes, Rollup appends weird prefixes to the path like commonjs:proxy
const index = m.id.indexOf(sep);
if (index >= 0) {
return m.id.substring(index);
}
return m.id;
});

// cache our bundle for later use
if (context.isWatch) {
Expand Down

0 comments on commit 350a288

Please sign in to comment.