You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
There is a major issue with source maps and I can not do a gulp build for production. After gulp build, the actual .map files will be injected instead of the concatenated .js files.
For instance, with the fountain default landing page for angular 1... when I try to load the dist/index.html, in chrome console I get:
dman777
changed the title
vendor-36190f5b7d.js.map:1 Uncaught SyntaxError: Unexpected token :
gulp build injects .map files into index.html and browser errors on their json
Oct 27, 2016
I confirmed the problem and found something that appears to work with the sample app. (I don't use your configuration. I use webpack and babel. Also, I haven't updated to the latest fountainjs)
Look in gulp_tasks/build.js for the section of code that resembles this block and apply my changes, which have caps in the comments:
returngulp.src(conf.path.tmp('/index.html')).pipe(inject(partialsInjectFile,partialsInjectOptions)).pipe(useref()).pipe(jsFilter).pipe(sourcemaps.init()).pipe(ngAnnotate()).pipe(uglify({preserveComments: uglifySaveLicense})).on('error',conf.errorHandler('Uglify')).pipe(rev())// .pipe(sourcemaps.write('maps')) COMMENT THIS OUT.pipe(jsFilter.restore).pipe(cssFilter).pipe(sourcemaps.init()).pipe(cssnano()).pipe(rev())// .pipe(sourcemaps.write('maps')) COMMENT THIS OUT.pipe(cssFilter.restore).pipe(revReplace()).pipe(sourcemaps.write('maps'))// ADD THIS HERE.pipe(htmlFilter).pipe(htmlmin()).pipe(htmlFilter.restore).pipe(gulp.dest(conf.path.dist()));}
That appeared to get the sample app working for me. I didn't test it out beyond that. Hope this helps and good luck.
Description
There is a major issue with source maps and I can not do a gulp build for production. After gulp build, the actual
.map
files will be injected instead of the concatenated.js
files.For instance, with the fountain default landing page for angular 1... when I try to load the
dist/index.html
, in chrome console I get:* This is even for the default landing page generated by the generator.
Error Message & Stack Trace
Config
Copy the content from
.yo-rc.json
:Relevant Links
Environment
Tell us which operating system you are using, as well as which versions of Node.js, npm, and yo. Run the following to get it quickly:
one@localhost ~/github/ugh $ uname -a
Linux localhost 4.0.5-gentoo #10 SMP Wed Feb 24 23:15:29 CST 2016 x86_64 Intel(R) Core(TM) i3 CPU M 350 @ 2.27GHz GenuineIntel GNU/Linux
one@localhost ~/github/ugh $
The text was updated successfully, but these errors were encountered: