ludohenin / gulp-inline-ng2-template

Gulp plugin to inline HTML and CSS into Angular 2 component decorators
MIT License
126 stars 26 forks source link

Parser Error: Unexpected end of input #72

Closed ezforms closed 8 years ago

ezforms commented 8 years ago

When I try to build for production in my Angular2 App using this seed, I get the following error.

/node_modules/gulp-inline-ng2-template/parser.js:188 _urls = eval('({' + frag + '})')[opts.prop_url]; ^ SyntaxError: Unexpected end of input

I dont even know where to look. Any guidence or what its trying to do at that point would be helpful.

ludohenin commented 8 years ago

You probably have an issue with one of your component decorator options.

ezforms commented 8 years ago

Thanks. Is it more likely to be pathing to html template or inline html?

ezforms commented 8 years ago

@ludohenin I found the issue. I had a styleUrls that was an empty array. So either is didnt like that it was empty or was trying to read the commented out style.

styleUrls: [
    // load the default theme
    //'@telerik/kendo-theme-default/dist/all.css'
],
renestalder commented 6 years ago

Nice one. Had the same issues. Thanks for pointing this out, @ezforms. Could this be improved, either with a better error message or by ignoring empty styleUrls?