source-maps

Does source-maps in style tags work?

孤街醉人 提交于 2019-12-03 16:59:10
问题 I'm having problems with CSS within a tag and source-maps. In order to improve the load time of my project, I have changed the way I put the CSS in my HTML, turning this: <html> <head> <link rel="stylesheet" href="css/styles.css"> </head> <body> <h1>Source-maps working wonderfully</h1> </body> </html> Into this: <html> <head> <style> h1 { color: red }; //more css /*# sourceMappingURL=css/style.css.map */ </style> </head> <body> <h1>Source-maps not working :(</h1> </body> </html> Basically,

javascript source map : keeping map file local only to debug production javascript

ぐ巨炮叔叔 提交于 2019-12-03 11:19:29
问题 I would like to debug production website, but I don't want to upload the map file on the server (for privacy reason, because it is public right ?). Is it possible ? 回答1: I don't believe any browsers currently allow loading source maps ondemand from local files, so you have to put the sourcemaps online somehow. One solution could be to create a .htaccess file (or something similar, if you aren't using Apache) that restricts access to the sourcemap (and the original source files) to clients

How to enable CSS sourcemaps for Angular 6 application?

青春壹個敷衍的年華 提交于 2019-12-03 09:57:25
问题 How do I enable sourcemaps for CSS files in my Angular 6 application? I'm defining my styles source code in SCSS files, which are later compiled to CSS by Angular CLI. However, I can't see the original source code in the browser during styles debugging. All styles are pointing to the <style>...</style> blocks. I want to be able to see the references to original SCSS files when debugging the compiled code. What options do I need to set in angular.json file? I've tried to use --source-map CLI

How to get Chrome to reload source maps?

帅比萌擦擦* 提交于 2019-12-03 08:40:23
问题 I am on Chrome Dev 27, and in the Dev Tools settings checked Disable cache . When I reload a page, Chrome properly reloads all the resources used by map page, including the .js files. However, it doesn't automatically reload the corresponding source maps .map . Monitoring the HTTP traffic between Chrome my app, on subsequent page load, I don't see any request from Chrome for the .map files. How can I get Chrome to also reload the source maps? The issue with Chrome not reloading the .map file

How to apply a hidden / remote sourcemap in Safari?

左心房为你撑大大i 提交于 2019-12-03 08:21:01
I'm attempting to debug an issue in my react app, that's only occurring on iOS, in production. I want to utilise a hidden sourcemap so I can debug the app's minified assets in Safari without overtly publishing the commented source. hidden-source-map - Same as source-map, but doesn’t add a reference comment to the bundle. https://webpack.github.io/docs/configuration.html#devtool In Chrome I can: serve the sourcemap wherever I like (eg main.js.map right next to the minified file) open the minified asset in the Sources tab right click and 'Add Sourcemap…', supplying the URL to main.js.map Cmd-p

Does source-maps in style tags work?

爱⌒轻易说出口 提交于 2019-12-03 06:07:45
I'm having problems with CSS within a tag and source-maps. In order to improve the load time of my project, I have changed the way I put the CSS in my HTML, turning this: <html> <head> <link rel="stylesheet" href="css/styles.css"> </head> <body> <h1>Source-maps working wonderfully</h1> </body> </html> Into this: <html> <head> <style> h1 { color: red }; //more css /*# sourceMappingURL=css/style.css.map */ </style> </head> <body> <h1>Source-maps not working :(</h1> </body> </html> Basically, during the building process, the original CSS file generated with sassc (with sourcemaps flag) is dumped

How do I enable source map support in Firebug?

家住魔仙堡 提交于 2019-12-03 05:23:31
I've been using Chrome for a good while now, and you have to explicitly enable souce map support in the options. I'm testing something in Firefox now with Firebug, but I'm not seeing my original source files - just the generated bundle. Is there some way to enable source map support in Firebug? I'm using Firebug 1.12.8 in Firefox 27.0.1. Firebug doesn't support source maps yet (as of 2.0.*). You may want to follow issue 5765 for source maps support for JavaScript and issue 5961 for CSS. Firebug 3 will integrate into the built-in DevTools of Firefox, which already have this feature. So Firebug

javascript source map : keeping map file local only to debug production javascript

坚强是说给别人听的谎言 提交于 2019-12-03 02:45:34
I would like to debug production website, but I don't want to upload the map file on the server (for privacy reason, because it is public right ?). Is it possible ? I don't believe any browsers currently allow loading source maps ondemand from local files, so you have to put the sourcemaps online somehow. One solution could be to create a .htaccess file (or something similar, if you aren't using Apache) that restricts access to the sourcemap (and the original source files) to clients that aren't from your local network. You should realize though, that if you want to prevent access to the

How to enable CSS sourcemaps for Angular 6 application?

若如初见. 提交于 2019-12-03 00:25:26
How do I enable sourcemaps for CSS files in my Angular 6 application? I'm defining my styles source code in SCSS files, which are later compiled to CSS by Angular CLI. However, I can't see the original source code in the browser during styles debugging. All styles are pointing to the <style>...</style> blocks. I want to be able to see the references to original SCSS files when debugging the compiled code. What options do I need to set in angular.json file? I've tried to use --source-map CLI argument for ng serve command, but it looks like it's not affecting anything. Sourcemap files are

How to configure sourceMaps for LESS using Grunt?

老子叫甜甜 提交于 2019-12-02 23:17:33
I'm using grunt 0.4.2 and grunt-contrib-less 0.9.0. I want my LESS to be compiled into CSS with support for source maps. My LESS files are in public/less , and the main one is called main.less . The compiling of public/less/main.less into public/css/main.css works, but source maps don't work. What is wrong with my Grunt config below? { less: { dev: { options: { compress: true, yuicompress: true, optimization: 2, sourceMap: true, sourceMapFilename: "public/css/main.css.source-map.json", //Write the source map to a separate file with the given filename. sourceMapBasepath: "public/less", //Sets