nwb icon indicating copy to clipboard operation
nwb copied to clipboard

npm.umd.entry not working in 0.22.0

Open jimniels opened this issue 6 years ago • 3 comments

This issue is a:

  • Bug report

Context:

  • Node v8.5.0
  • NPM v5.7.1
  • NWB v0.22.0

If I add a configuration option for npm.umd.entry like this:

module.exports = {
  // stuff here
  npm: {
    umd: {
      entry: "./src/umd.js"
    }
  }
}

When I try to build the app, nwb reports back:

screen shot 2018-03-30 at 4 03 41 pm

After looking around, I saw the commit where this feature was added and everything looked right to my eyes in that file.

So I dug into my node_modules folder and found this in node_modules/nwb/lib/config/npm.js:

screen shot 2018-03-30 at 4 05 58 pm

Note that very last line that's highlighted. Code related to 'entry' is missing. It appears as though these changes aren't in the compiled code at all.

If I add 'entry' to the expected configuration keys (global and externals) like this (note the very last line that's highlighted):

screen shot 2018-03-30 at 4 06 09 pm

Then run nwb build-react-component (with my nwb.config.js having a value for npm.umd.entry) everything works just dandy.

This makes me think there's something wrong with the compiled code I'm getting via NPM?

jimniels avatar Mar 30 '18 22:03 jimniels

This is currently only in master, not released yet

insin avatar Apr 12 '18 09:04 insin

This is released and happening from npm .

nmccready avatar May 11 '18 17:05 nmccready

+1

marek-baranowski avatar May 20 '18 19:05 marek-baranowski