Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

fix: improve isSouceMap check #284

Merged
merged 1 commit into from
May 2, 2018
Merged

fix: improve isSouceMap check #284

merged 1 commit into from
May 2, 2018

Conversation

alexander-akait
Copy link
Member

fixes #283

Copy link
Member

@joshwiens joshwiens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sokra - He has a point about the error output, i've run into this before & per the comment in the original issue this is super hard to debug if you don't know what you are looking for

@joshwiens joshwiens merged commit dbebb3b into master May 2, 2018
@joshwiens joshwiens deleted the issue-283 branch May 2, 2018 17:59
@nehaabrol87
Copy link

@sokra With what version of webpack 4 is this plugin available ? When mode = 'production' , webpack 4 automatically includes UglifyJsPlugin . Ever since I upgraded my preact project to use webpack 4 , my development build was working fine but some react beatutiful dnd modules were being rendered as undefined only in production.

After going down a lot of rabbit holes , I figured setting mode = development on production webpack config works but of course I still do not understand if the real problem is webpack 4 or preact-compat not working well with any of the automatically included plugins in webpack 4 -

Plugins automatically available with webpack 4

Provides process.env.NODE_ENV with value production. Enables FlagDependencyUsagePlugin, FlagIncludedChunksPlugin, ModuleConcatenationPlugin, NoEmitOnErrorsPlugin, OccurrenceOrderPlugin, SideEffectsFlagPlugin and UglifyJsPlugin

Setting that works in my project and does not render undefined for react-beautiful-dnd modules

mode = 'development'
and adding
optimization: {
namedModules: true, // NamedModulesPlugin()
splitChunks: { // CommonsChunkPlugin()
name: 'vendor',
minChunks: 2
},
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
concatenateModules: true
},

NOTE: Long story short , I still do not understand if the real problem is webpack 4 or preact-compat not working well with any of the automatically included plugins in webpack 4.
I am going too notify preact-compat folks as well.

Versions
webpack@4.8.1
preact-compat@3.18.0

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

Successfully merging this pull request may close these issues.

Unnecessary warning on "invalid source map" for JSON files
3 participants