-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rxjs imports don't work correctly #459
Comments
i love it. once you write it down, the bug suddenly jumps at you: 'rxjs': { main: './Rx.js', } instead of 'rxjs': { main: './bundles/Rx.js', } did the trick. Still leaving this open, though, for some feedback. Including the Rx.js bundle via script-tag gave me the impression Rx.js would work out of the box. |
@chapati23 I think there is an open PR to load all scripts through systemJS which I THINK will solve this issue. |
I think you'll be able to get the subject you need by editing this line (on the PR):
to
It feels kinda bothersome to list them so in the bundled list, but I couldn't find a better way. |
yeah. I kinda liked the jspm approach where you basically just map the package-folder and can then import whatever your packages exports. is importing 3rd-party scripts from node_modules directly no option? I'm still not understanding where exactly angular-cli compiles typescript, i think |
The CLI compiles Typescript files (and other stuff like sass/less/stylus) as a part of it's brocolli based build system, so it's logic is all internal. By the time it gets to SystemJS, all app files are already compiled down to SystemJS modules inside of js files. If you're curious, feel free to check https://github.com/angular/angular-cli/tree/master/lib/broccoli, where The build step moves stuff around so you can't import directly from For a dist build you don't want everything in |
got it, thanks. where would something like treeshake/rollup e.g. fit in then? As a broccoli plugin?
|
Quite likely, yes. We're still working on the process so that might change though. Current plan is to use SystemJS builder for production builds, and I believe it uses rollup internally so you'd end up only with stuff you use. |
Ah, great! Didn't know that. Sent from my iPhone
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm migrating my app over from a JSPM setup and running into issues with Rxjs Imports.
Created a new app with
ng new test-app
so no crazy settings or something.It might be that it's just a misunderstanding on my part on how importing 3rd-party-packages works in angular-cli vs. jspm (where i can just
jspm install abc
and thenimport 'abc'
)Error Msg
When bootstrapping the app, I get:
Repro steps
In a service I do (shortened for clarity):
index.html
<script>
-tag like in the default project => same result'rxjs': { map: … }
=> same resultangular-cli-build.js
Versions
OSX 10.11.4
angular-cli: 0.0.31
node: 5.10.1
os: darwin x64
The text was updated successfully, but these errors were encountered: