admin 管理员组文章数量: 1086019
I'm using this repo as base. I have solved almost every other plugin's errors but I'm not able to solve this error.
No other plugin expects a .map file when making an SSR build as it is a production one. But I don't know from where is it creeping in.
Here is the line causing the error. in server.js
file.
margin: -1px 0; }\n\n/*# sourceMappingURL=swiperponent.css.map
I don't want to remove it manually every time I make a build so how to solve the issue and what the issue could be.
ERROR Something went wrong please try again later! ERROR { Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'swiperponent.css.map' Error: Cannot match any routes. URL Segment: 'swiperponent.css.map' at ApplyRedirects.noMatchError (E:\xampp\htdocs\havemybooks\dist\server.js:146214:16) at CatchSubscriber.selector (E:\xampp\htdocs\havemybooks\dist\server.js:146195:29) at CatchSubscriber.error (E:\xampp\htdocs\havemybooks\dist\server.js:29486:31) at MapSubscriber.Subscriber._error (E:\xampp\htdocs\havemybooks\dist\server.js:20931:26)
Update:
I found the culprit it's the plugin which has inline /*# sourceMappingURL=swiperponent.css.map */
So is there a webpack configuration to replace the inline sourcemaps already present.
I tried --devtool false
with webpack but no success
I'm using this repo as base. I have solved almost every other plugin's errors but I'm not able to solve this error.
No other plugin expects a .map file when making an SSR build as it is a production one. But I don't know from where is it creeping in.
Here is the line causing the error. in server.js
file.
margin: -1px 0; }\n\n/*# sourceMappingURL=swiper.ponent.css.map
I don't want to remove it manually every time I make a build so how to solve the issue and what the issue could be.
ERROR Something went wrong please try again later! ERROR { Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'swiper.ponent.css.map' Error: Cannot match any routes. URL Segment: 'swiper.ponent.css.map' at ApplyRedirects.noMatchError (E:\xampp\htdocs\havemybooks\dist\server.js:146214:16) at CatchSubscriber.selector (E:\xampp\htdocs\havemybooks\dist\server.js:146195:29) at CatchSubscriber.error (E:\xampp\htdocs\havemybooks\dist\server.js:29486:31) at MapSubscriber.Subscriber._error (E:\xampp\htdocs\havemybooks\dist\server.js:20931:26)
Update:
I found the culprit it's the plugin which has inline /*# sourceMappingURL=swiper.ponent.css.map */
So is there a webpack configuration to replace the inline sourcemaps already present.
I tried --devtool false
with webpack but no success
-
try removing
\n\n
(margin: -1px 0; }/*# sourceMappingURL=swiper.ponent.css.map
) – Gaspar Commented Sep 28, 2018 at 16:32 - Yes, that will fix the issue. But I don't want to do it manually every time I make a build. – Black Mamba Commented Sep 28, 2018 at 17:27
-
I think its that ponent for simplifying code and build with less space that put
\n\n
in this line. Try to look some configuration to that ponent (forget the name of it) – Gaspar Commented Sep 28, 2018 at 17:47
1 Answer
Reset to default 8This is a bug in angular cli. But you can manually specify to not to produce source maps in angular.json
file.
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
...
"sourceMap": false
},
...
}
本文标签: javascriptHow to remove sourceMappingURL from the angular universal buildStack Overflow
版权声明:本文标题:javascript - How to remove sourceMappingURL from the angular universal build? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744062558a2526990.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论