Relative paths in source maps
See original GitHub issueI’m trying to switch from jsx-loader. My webpack.config.js
is like this:
module.exports = {
entry: './src/javascript/main.jsx',
output: {
devtoolModuleFilenameTemplate: '[resource-path]',
path: './public/js/',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.jsx$/, loaders: ['jsx'] }
]
}
};
This will produce relative paths in source maps.
{
sources: ["./src/javascript/main.jsx"]
}
If I use babel-loader with the same config, it will produce absolute paths.
{
sources: ["/full/path/src/javascript/main.jsx"]
}
Are there any methods to solve this problem?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Generating source maps with relative path in sourceRoot ...
Generating source maps with relative path in sourceRoot option produces maps with abosolute file paths #23180.
Read more >Webpack: How to get relative path in css sourcemap
The question is, is it possible to shorten the source map to be relative to my project root path? So instead of /Users/xunyang/workspace/ ......
Read more >APM Sourcemap relative path? - APM - Discuss the Elastic Stack
Our application uses dynamic subdomains - is there a way to upload source maps using a relative path? Right now, if we upload...
Read more >tweak-sourcemap-paths - npm
Many sourcemap tools will embed relative paths to source files (like ../../foo/bar.js ), or include unnecessary paths (like src/core ).
Read more >FAQ: Should relative paths to data be stored in map documents?
A relative path is the location of a computer file, given in relation to the current working directory. When a map document stores...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Invalid absolute resource paths are the reason. babel-core@6.18.2 webpack@2.1.0-beta.27
@byelims you probably need to check whether in your .babelrc your babel presets for production env is different (e.g. if using react it’s not
react-hmre
) than your development.