aurelia / bundler

A library for bundling JavaScript, HTML and CSS for use with SystemJS.
MIT License
37 stars 25 forks source link

Import from "./file" has wrong path after bundling. #117

Closed sensedeep closed 8 years ago

sensedeep commented 8 years ago

I have an app that works without bundling. With bundling, I get console errors when I run the app. No errors during bundling.

The source in question is:

services/index.js

import {Auth} from "./auth.js"

This is bundled as:

System.registerDynamic("services/index.js", ["./auth.js", ], true, function($__require, exports, module) {
  "use strict";

  var define,
      global = this,
      GLOBAL = this;
  var auth_js_1 = $__require('./auth.js');

Auth.js is not dot relative to the bundled source anymore. it should be rewritten as require("services/auth")

How can I fix or work around this? Any ideas?

ahmedshuhel commented 8 years ago

@sensedeep Could you please provide a sample repo the reproduces this problem?

sensedeep commented 8 years ago

Sorry, but the source has moved on and I cannot re-create. From memory, we added map entries to config.js to solve the problem. Sorry. Please feel free to close the issue as I cannot provide more information.