You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building my project, I use browserify with coffeeify and I set extensions: ['.coffee'] in configuration. I also have automatic coffeescript compiler running in my IDE to quickly see how the compiled code for a file looks. I don't use extensions in my require calls.
Problem is, when compiling, browserify prefers the already compiled .js files over the source .coffee files, which breaks the generated source map (it maps to the .js files instead of the real source).
In index.js of browserify on line 433, extensions are added in the following way: mopts.extensions = [ '.js', '.json' ].concat(mopts.extensions || []);
I suggest reversing the operation and appending .js and .json to the end, so it gives precedence to custom extensions.
The text was updated successfully, but these errors were encountered:
When building my project, I use browserify with coffeeify and I set
extensions: ['.coffee']
in configuration. I also have automatic coffeescript compiler running in my IDE to quickly see how the compiled code for a file looks. I don't use extensions in myrequire
calls.Problem is, when compiling, browserify prefers the already compiled
.js
files over the source.coffee
files, which breaks the generated source map (it maps to the.js
files instead of the real source).In
index.js
of browserify on line 433, extensions are added in the following way:mopts.extensions = [ '.js', '.json' ].concat(mopts.extensions || []);
I suggest reversing the operation and appending
.js
and.json
to the end, so it gives precedence to custom extensions.The text was updated successfully, but these errors were encountered: