Giter VIP home page Giter VIP logo

Comments (16)

QJesus avatar QJesus commented on August 25, 2024 1

we're using linq-es5 now.

from linq.

ENikS avatar ENikS commented on August 25, 2024

I am getting these:

ng build --prod --aot

Hash: 49f7c1723ab0805adf33
Time: 9360ms
chunk {0} polyfills.60187f338ba5b0a175a8.bundle.js (polyfills) 157 kB {4} [initial] [rendered]
chunk {1} main.34d479817913c2e259ab.bundle.js (main) 21.1 kB {3} [initial] [rendered]
chunk {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk {3} vendor.b28ec3831422d17d6458.bundle.js (vendor) 1.1 MB [initial] [rendered]
chunk {4} inline.e0de3f77c7d382fb8ed1.bundle.js (inline) 0 bytes [entry] [rendered]

I can not see the error you mentioned. Perhaps try cloning your project into fresh dir, do install and rebuild?

from linq.

QJesus avatar QJesus commented on August 25, 2024

Hi ENikS, Thanks for your answer.
I update the angular demo project to reappearance the problem.

I ng build --prod --aot at a fresh dir.

from linq.

ENikS avatar ENikS commented on August 25, 2024

I don't see you following required steps outlined here:
https://github.com/ENikS/LINQ/tree/examples/Angular

Where is your systemjs.config.js?

from linq.

ENikS avatar ENikS commented on August 25, 2024

It looks like you are running outdated version of CLI (1.0.2). The latest (1.0.3) version compiles and runs just fine. I've updated Angular example to use latest CLI and compiler. Use this sample to troubleshoot your demo.

from linq.

QJesus avatar QJesus commented on August 25, 2024

My Environment:

PS C:\Users\qin_x\GitHub\LINQ\Angular> ng -v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
/ ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |                   
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.3
node: 6.10.1
os: win32 x64
@angular/common: 4.1.2
@angular/compiler: 4.1.2
@angular/core: 4.1.2
@angular/forms: 4.1.2
@angular/http: 4.1.2
@angular/platform-browser: 4.1.2
@angular/platform-browser-dynamic: 4.1.2
@angular/router: 4.1.2
@angular/cli: 1.0.3
@angular/compiler-cli: 4.1.2

when I finished my project, I need to publish. So I will use ng build --prod --aot to compile angular.
here is an error as below. I use a clone of your Angular example demo project.

PS C:\Users\qin_x\GitHub\LINQ\Angular> ng build --prod --aot
Hash: b328418fa6d59b23c1c9
Time: 6543ms
chunk    {0} polyfills.6ce0bf58446ef5c2585b.bundle.js (polyfills) 157 kB {4} [initial] [rendered]
chunk    {1} main.c41bdfe5ffe65e3d0f1c.bundle.js (main) 22.1 kB {3} [initial] [rendered]
chunk    {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk    {3} vendor.ad3c476facb2f3344732.bundle.js (vendor) 1.14 MB [initial] [rendered]
chunk    {4} inline.fd490338ae1450fbb70b.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in vendor.ad3c476facb2f3344732.bundle.js from UglifyJs
Unexpected token: name (CSharpEnumerator) [vendor.ad3c476facb2f3344732.bundle.js:18488,6]

from linq.

ENikS avatar ENikS commented on August 25, 2024

Clone sample project and try to build it.

In your package.json you require CLI 1.0.2

"devDependencies": {
    "@angular/cli": "1.0.2",

from linq.

QJesus avatar QJesus commented on August 25, 2024

I cloned your project then ng build --prod --aot.

from linq.

ENikS avatar ENikS commented on August 25, 2024

... and?

from linq.

QJesus avatar QJesus commented on August 25, 2024

And I got an error like below:

PS C:\Users\qin_x\GitHub\LINQ\Angular> ng build --prod --aot
Hash: b328418fa6d59b23c1c9
Time: 6745ms
chunk    {0} polyfills.6ce0bf58446ef5c2585b.bundle.js (polyfills) 157 kB {4}
 [initial] [rendered]
chunk    {1} main.c41bdfe5ffe65e3d0f1c.bundle.js (main) 22.1 kB {3} [initial
] [rendered]
chunk    {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [i
nitial] [rendered]
chunk    {3} vendor.ad3c476facb2f3344732.bundle.js (vendor) 1.14 MB [initial
] [rendered]
chunk    {4} inline.fd490338ae1450fbb70b.bundle.js (inline) 0 bytes [entry]
[rendered]

ERROR in vendor.ad3c476facb2f3344732.bundle.js from UglifyJs
Unexpected token: name (CSharpEnumerator) [vendor.ad3c476facb2f3344732.bundl
e.js:18488,6]
PS C:\Users\qin_x\Documents\GitHub\LINQ\Angular>

from linq.

ENikS avatar ENikS commented on August 25, 2024

According to this Uglifyjs does not support ES2015 syntax. If you want to minify your project you have to use babel to transpile it to es5. Read the thread for the explanation and solution for the issue.

You could use ES5 linq-es5 package and stay compatible with Uglifyjs. The packages are binary compatible with linq-es2015 being slightly faster on ES6 browser.

from linq.

QJesus avatar QJesus commented on August 25, 2024

thx.

from linq.

ENikS avatar ENikS commented on August 25, 2024

Not sure if you still need the minified version but you could use Browserify to compact it

from linq.

ENikS avatar ENikS commented on August 25, 2024

There is no reason to downgrade performance just because Uglifyjs does not support latest standard. These generators ( functon * ) really do make a difference.

Browserify can do as good of a job if not better to compact packages. There is a minified version in ./dist dictionary if you want to run benchmarks.

from linq.

QJesus avatar QJesus commented on August 25, 2024

Is there a simple example of angular ?

from linq.

ENikS avatar ENikS commented on August 25, 2024

I do not know.

from linq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.