source-maps

Symfony2 Assetic and Less Sourcemaps

时光毁灭记忆、已成空白 提交于 2020-01-03 17:01:52
问题 I am unsure how I can hack the assetic less filter to output a sourcemap file. I am referring to the LessFilter here https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/LessFilter.php lines 145 and 146 is where the Symfony\Component\Process\Process object is created $proc = $pb->getProcess(); $code = $proc->run(); The trouble is this output gets placed into one single file. I am not sure how to generate a second sourcemap file. How can I extend this filter or hack the

Symfony2 Assetic and Less Sourcemaps

ぃ、小莉子 提交于 2020-01-03 17:01:00
问题 I am unsure how I can hack the assetic less filter to output a sourcemap file. I am referring to the LessFilter here https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/LessFilter.php lines 145 and 146 is where the Symfony\Component\Process\Process object is created $proc = $pb->getProcess(); $code = $proc->run(); The trouble is this output gets placed into one single file. I am not sure how to generate a second sourcemap file. How can I extend this filter or hack the

Which is the base url of sourcemappingurl: relative from html or js?

不羁岁月 提交于 2020-01-02 02:32:14
问题 Suppose that there is a js file with source-map in subdirectory of a html file. index.html (uses js/myjs.js) js/myjs.js js/myjs.js.map then which is the sourceMappingURL comment of myjs.js ? //# sourceMappingURL=myjs.js.map or //# sourceMappingURL=js/myjs.js.map 回答1: I lookup to the specification. When the source mapping URL is not absolute, then it is relative to the generated code’s “source origin”. The source origin is determined by one of the following cases: If the generated source is

How to create a source map for WebPack?

别等时光非礼了梦想. 提交于 2020-01-01 10:07:11
问题 My current webpack.config file module.exports = { entry: "./entry.js", output: { devtoolLineToLine: true, sourceMapFilename: "./bundle.js.map", pathinfo: true, path: __dirname, filename: "bundle.js" }, module: { loaders: [ { test: /\.css$/, loader: "style!css" } ] }, }; I was reading here https://webpack.github.io/docs/configuration.html and found the following: output.sourceMapFilename [file] is replaced by the filename of the JavaScript file. [id] is replaced by the id of the chunk. [hash]

WebPack sourcemaps confusing (duplicated files)

风格不统一 提交于 2020-01-01 08:05:14
问题 I decided to try out WebPack on a new project I'm spinning up today and I'm getting really strange behavior from the sourcemaps. I can't find anything about it in the documentation, nor can I find anyone else having this issue when skimming StackOverflow. I'm currently looking at the HelloWorld app produced by Vue-CLI's WebPack template -- no changes have been made to the code, the build environment, or anything. I installed everything and ran it like so: vue init webpack test && cd test &&

When do browsers download sourcemaps?

混江龙づ霸主 提交于 2019-12-30 00:25:28
问题 When do browsers download the sourcemap for a minified file? I am struggling to find documentation for any browser on if/when they download a minified file's sourcemap (an external file ending in a .map extension, like scriptname.min.js.map ). I am trying to decide how verbose a map file I want to create (which drastically affects the file size) but I don't see where the file is downloaded in Google Chrome (not showing in the network tab of Dev Tools) yet it is available when I debug in the

VSCode react-native typescript: breakpoints ignored because source code not found

青春壹個敷衍的年華 提交于 2019-12-25 09:26:40
问题 I am unable to have my breakpoints hit in my typescript files inside my react-native project. I have looked at various similar questions here at stackoverflow and also on github. (here, here) Here is my tsconfig.json: { "compilerOptions": { "target": "es2015", "module": "es2015", "jsx": "react", "outDir": "build", "rootDir": "src", "allowSyntheticDefaultImports": true, "noImplicitAny": true, "experimentalDecorators": true, "preserveConstEnums": true, "allowJs": true, "sourceMap": true },

Chrome Debugger - “No Domain” Section Showing Duplicated Paths (after Webpack)

≡放荡痞女 提交于 2019-12-24 11:29:24
问题 I will first include a picture, as it explains the situation the best: My question is as follows: The paths circled in red are really odd. Here is an example: C:/Users/..../Documents/Programming/_actual-programs/html-css-js/github-pages/name.github.io/src/C:/Users/.../Documents/Programming/_actual-programs/html-css-js/github-pages/name.github.io/src/C:/Users/.../Documents/Programming/_actual-programs/html-css-js/github-pages/name.github.io/src/C:/Users/.../Documents/Programming/_actual

How do I set Firefox Dev Tools to respect source maps in the console?

坚强是说给别人听的谎言 提交于 2019-12-24 09:37:27
问题 I'm using Firefox v47 on a Mac. I've worked out how to get the Debugger to use JavaScript source maps to show where I'm triggering some code, but it uses the compiled file in the Console. How do I get it to show me the uncompiled file lines? This works out of the box in Chrome, so seems an odd omission in Firefox so I'm assuming I've done something wrong. 回答1: In the Firefox Toolbox Settings, enable the option Show original sources in the Style Editor area. This option should, however, be

debugging into angular 2 typescript source code

随声附和 提交于 2019-12-24 08:36:12
问题 I have an angular2 project generated by angular-cli. I want to be able to debug the angular2 typescript source code in chrome dev tools (not my own typescript code but the actual angular2 code). The angular2 npm package under node_modules only contains the transpiled javascript files but they contain source mappings. How can I make this work? Thx. 回答1: How about putting debugger; at the location you want to debug, this will trigger a breakpoint in chrome dev tools and you can work your way