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

No file extension appended when aliasing #8

Closed
cdunford opened this issue Sep 16, 2016 · 1 comment
Closed

No file extension appended when aliasing #8

cdunford opened this issue Sep 16, 2016 · 1 comment

Comments

@cdunford
Copy link

I am using rollup with typescript to build an angular2 application. As such, there is a need to alias rxjs to rxjs-es, which I have done as shown in most examples:

rollup({ entry: 'src/ts/main.ts', plugins: [ typescript(), alias({ rxjs: __dirname + '/node_modules/rxjs-es' }), nodeResolve({ jsnext: true }), buble(), uglify() ] }).then(function (bundle) { return bundle.write({ format: 'iife', dest: 'dist/js/app.js', moduleName: 'MyModule', sourceMap: true });

I get the following error when trying to build. It looks like the file extension is missing. It should be looking for Subject.js and not just subject:

Error: Could not load D:\src\myproject\myproject\myproject_client/node_modules/rxjs-es/Subject (imported by D:\src\myproject\myproject\myproject_client\node_modules\@angular\core\src\facade\async.js): ENOENT: no such file or directory, open 'D:\src\myproject\myproject\myproject_client\node_modules\rxjs-es\Subject'

When I take resolve-plugin-alias out, it looks for rxjs\Subject.js, which obviously fails for other reasons.

I am using rollup 0.35.11 and rollup-plugin-alias 1.2.0

Thanks.

@cdunford cdunford reopened this Sep 16, 2016
@cdunford
Copy link
Author

This is a duplicate of Issue 3. Closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant