Skip to content
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

Add .js extension to webpack.ouput.filename to handle non js extension #127

Closed
wants to merge 1 commit into from

Conversation

cevek
Copy link

@cevek cevek commented Jun 2, 2016

In particular when we use typescript loader, webpack doesn't insert inlined source maps into output file because it is not .js extension

webpack: {
            resolve: {
                extensions: ['', '.js', '.ts', '.tsx']
            },
            module: {
                loaders: [
                    {test: /\.tsx?$/, loader: 'ts-loader'}
                ]
            },
            devtool: 'inline-source-map',
}

@sshev
Copy link

sshev commented Jun 9, 2016

I've managed to generate source maps for typescript project without patching. Check this #109 (comment)

@joshwiens
Copy link
Contributor

I also have this running in a full typescript setup, as does @gdi2290 here

@MikaAK
Copy link
Contributor

MikaAK commented Jul 24, 2016

I'm going to close this because I don't think it's necessary to do this. As @sshev and @d3viant0ne pointed out there are already ways of doing this without this patch. Feel free to comment otherwise and I can reopen if necessary

@MikaAK MikaAK closed this Jul 24, 2016
@SPSpwetter
Copy link

Commenting otherwise...the file name used by the karma-webpack plugin to generate code should be between the plugin and webpack. This is a very confusing issue, judging by the number of people that have a problem with it.

@giniedp
Copy link

giniedp commented Feb 25, 2017

I also agree that this issue is very frustrating. I spent hours to track down the cause and find the solution. In the end it prevents the devtool option to be used and forces the usage of SourceMapDevToolPlugin instead. Would be nice if karma-webpack would handle that behind the scenes or at least if the workaround (#109 (comment)) would have been documented here https://github.com/webpack-contrib/karma-webpack#source-maps

@xunnanxu
Copy link

I second @SPSpwetter and @giniedp and disagree with @MikaAK 's decision above. The so-called "solution" is more of a workaround. I don't know the details of this code base but IMHO the solution in this PR looks righter to me.

@njgraf512
Copy link

njgraf512 commented Sep 26, 2017

@MikaAK, also "commenting otherwise" here as well. If the PR solves the problem as it says it does (I have not personally verified it, but it looks like it adds up), then IMO, I think it really should be merged.

I can't say that I understand your explanation re: your decision to close the PR based on there being "other ways of doing this without the patch." Is your expectation that developers should go searching through comment after comment in multiple Github issue threads to come up with a work-around solution to this common use case? I'm hoping that that is not the bar being set here.

Overall, I'd echo what @giniedp said 100%. His points about hours of needless searching for a solution (with no mention in official documentation) plus the inability to use devtool option are spot on. Having functional sourcemaps from typescript is not, by any stretch, an obscure use case, and the need for it is only going to continue to increase with the fast-growing TS community.

In addition, AFAICT, the PR to get this done is a set of trivial changes to 4 lines of code. Are there any actual drawbacks to these changes that I'm not seeing? To conclude, I'd like to request that you consider reopening this PR for merging and also say thank you for all the (often thankless) time you put in to maintain it.

@reda-alaoui
Copy link

This pull request rejection is unbelievable.
I have no other word.

@reda-alaoui
Copy link

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 this pull request may close these issues.

9 participants