-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix webpack support #2857
Fix webpack support #2857
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,8 @@ const path = require('path'); | |
* Mapbox GL JS uses the webworkify module by default, and that module | ||
* does things very specific to browserify's module loading system. In this | ||
* configuration, we alias webworkify to webworkify-webpack to add webpack | ||
* support. | ||
* support. NOTE: there is a known caveat when using 'eval'-related devtool | ||
* settings, make sure to double-check your configuration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you provide more context here? What is the caveat? What should developers check their configurations for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apologies for the confusion, I'm afraid English is not my first language. I was referring to this part of
|
||
*/ | ||
module.exports = { | ||
entry: './test.js', | ||
|
@@ -59,5 +60,6 @@ module.exports = { | |
loader: 'transform', | ||
query: 'brfs' | ||
}] | ||
} | ||
}, | ||
devtool: 'cheap-source-map' // don't use eval-related options | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand borisirota/webworkify-webpack#9 correctly, this shouldn't be necessary with webworkify-webpack 1.1.1, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be fixed, correct. However, I'm on
webworkify-webpack@1.1.1
andmapbox-gl@0.20.1
using the recommended webpack.config.js setup. This produced the error mentioned in the pull request. Adding a name to the function fixed the issue for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this line ☝️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the time being, webworkify-webpack needs a named function to operate correctly.