Skip to content

Source Maps Not Generated #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
victormoukhortov opened this issue Feb 26, 2016 · 4 comments · Fixed by #100
Closed

Source Maps Not Generated #18

victormoukhortov opened this issue Feb 26, 2016 · 4 comments · Fixed by #100

Comments

@victormoukhortov
Copy link

It seems as though source maps for my exposed file don't get generated properly:

loaders: [{
   test: require.resolve('./index.js'),
   loaders: ['expose?MyProject', 'babel-loader']
}]

The generated source map looks like this (using cheap-module-eval-source-map), which does not match the contents of index.js

module.exports = global["MyProject"] = require("-!/{...}/node_modules/babel-loader/index.js!/{...}/index.js");

/** WEBPACK FOOTER **
 ** index.js
 **/
@evisong
Copy link

evisong commented May 23, 2016

Facing the same issue. Source map is not correct.

@evisong
Copy link

evisong commented Aug 16, 2016

I've met another related issue: with the combination of cheap-module-eval-source-map and babel?presets[]=es2015&presets[]=react&presets[]=stage-0, the build failed due to soft errors:

... Cannot assign to read only property \'mappings\' of {"version":3,"sources":["... 

Which seems that expose-loader was trying to parse source maps but failed.

My workaround is to switch the order of expose-loader and babel-loader:

loaders: ['babel?presets[]=es2015&presets[]=react&presets[]=stage-0', 'expose?xxx']

The generated source map is still not right (just like the one @victormoukhortov pasted), but at least the compilation succeeds.

@evisong
Copy link

evisong commented Jan 19, 2017

Hi, team,

Sorry for pushing but any progress on this ticket?

Thanks.

@SpaceK33z
Copy link

@evisong no. Please try to create a PR if you really want this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants