Skip to content
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

Angular Universal compile error #64

Open
lomboboo opened this issue Nov 20, 2017 · 1 comment
Open

Angular Universal compile error #64

lomboboo opened this issue Nov 20, 2017 · 1 comment

Comments

@lomboboo
Copy link

I'm submitting a ... (check one with "x")

[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request

Current behavior
Currently it is not possible to use this package with Angular Universal Server Side Rendering. During compiling I'm getting error:

some_path/client/dist/ngfactory/node_modules/ng2-slim-loading-bar/style.css.shim.ngstyle.ts:9

export const styles:any[] = ['.slim-loading-bar[_ngcontent-%COMP%] {\n    position: fixed;\n    margin: 0;\n    padding: 0;\n    top: 0;\n    left: 0;\n    right: 0;\n    z-index: 99999;\n}\n\n\n.slim-loading-bar-progress[_ngcontent-%COMP%] {\n    margin: 0;\n    padding: 0;\n    z-index: 99998;\n    background-color: green;\n    color: green;\n    box-shadow: 0 0 10px 0; \n    height: 2px;\n    opacity: 0;\n\n    \n    -webkit-transition: all 0.5s ease-in-out;\n    -moz-transition: all 0.5s ease-in-out;\n    -o-transition: all 0.5s ease-in-out;\n    transition: all 0.5s ease-in-out;\n}'];
^^^^^^

SyntaxError: Unexpected token export
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Module._extensions..js (module.js:579:10)

Expected/desired behavior
Make Angular Universal "friendly"

I also tried to compile whole ng2-slim-loading-bar package into 2015 with babel, but it didn't work.

  • ng2-slim-loading-bar version: 4.0.0

  • Angular version: 4.3.0

@greatkeke
Copy link

Hi, there
I got another error:

node_modules/ng2-slim-loading-bar/src/slim-loading-bar.component.js:4
import { Component, Input } from '@angular/core';
^^^^^^

SyntaxError: Unexpected token import

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

No branches or pull requests

2 participants