-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
meteor run --production not working: Uncaught SyntaxError: Unexpected token import #724
Comments
Previously reported on angular-meteor repo Urigo/angular-meteor#1755 |
In Urigo/angular-meteor#1755 @ardatan comments: "Actually this is problem of ngx, because they have to make a bundle for commonjs like other Angular libraries ..." Would it be feasible for this module to support integration with MeteorJS by adding support for commonjs? |
Yes, I was actually thinking about updating the build system (this one is largely outdated), it would also improve the size of the lib. |
Would you be able to provide a potentially timeframe for adding this support? |
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
This fix may also close issue #681 |
I updated the packages in my Meteor project and ran it in production mode. I am no longer getting the reported error "Unexpected token import". Unfortunately I am getting a different error and it is still not working in production. Now I am getting
On this line
Any ideas? Here are my package versions after updating:
|
Would a similar update to the |
I changed |
ok, that's weird, but it's nice that you fixed it! |
I'm submitting a ... (check one with "x")
Current behavior
Not sure if this is an ngx-translate issue or a Meteor issue.
Meteor application loads and runs in development mode (meteor run), but stops working in production mode (meteor run --production). I removed the standard-minifier-js package and it still does not work.
Receiving the following error:
Uncaught SyntaxError: Unexpected token import
on this line of code:
import { Directive, ElementRef, Input, ChangeDetectorRef } from '@angular/core';
Expected/desired behavior
Application should run after production build.
Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar. You can use this template as a starting point: http://plnkr.co/edit/tpl:WccVZSBM0rUgq2sXSUbe
Open
http://localhost:300
and see that application is running in development modeThen stop the app (control C) and run in production mode.
Open
http://localhost:300
and see that application is running in production mode (expected behavior)Now add the TranslateModule
npm install --save @ngx-translate/core @ngx-translate/http-loader
Edit the
client/imports/app/app.module.ts
Add required imports
Add modules to the imports
Export the loader function
Open
http://localhost:300
and see that application is running in development modeThen stop the app (control C) and run in production mode.
Open
http://localhost:300
and see that application does not work.What is the expected behavior?
The application should run in production mode.
What is the motivation / use case for changing the behavior?
So that a Meteor application can be bundled for production
Please tell us about your environment:
Mac OS 10.13.1
Meteor v1.6
meteor node --version => v8.8.1
meteor npm --version => v5.4.2
packages:
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.0"
ngx-translate version: x.x.x
8.0.0
Angular version: 2.x.x
4.4.6
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome Version 62.0.3202.94 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: