rxaviers / globalize-webpack-plugin

Globalize.js webpack plugin
Other
33 stars 27 forks source link

Production build fails in webpack 2 #59

Closed huy-nguyen closed 7 years ago

huy-nguyen commented 7 years ago

I'm trying to make a bare bones example that follows the instructions in the provided example. This is my repo. The development build works without problem but the production build fails with this error:

Uncaught TypeError: Cannot read property 'call' of undefined
    at __webpack_require__ (bootstrap 109962a4a7536acf6d6f:691)
    at fn (bootstrap 109962a4a7536acf6d6f:114)
    at Object.5 (index.jsx:1)
    at __webpack_require__ (bootstrap 109962a4a7536acf6d6f:691)
    at webpackJsonpCallback (bootstrap 109962a4a7536acf6d6f:25)
    at main.js:1

The app fails when it tries to require the globalize module. I'm not sure what's causing the problem. I've tried using the latest pre-release versions of globalize and globalize-webpack-plugin. Can you help @rxaviers?

rxaviers commented 7 years ago

Hi @huy-nguyen, for webpack 2, please use our 1.0.0 pre-release (v1.0.0-alpha.0). Sorry for the inconvenience.

PS: Thank you for providing a repo where I could reproduce your issue.

rxaviers commented 7 years ago

Also please keep in mind your example makes use of not-yet-released globalize 1.3.0. Take a look at this roadmap for clarification on the respective globalize-webpack-plugin support https://github.com/rxaviers/globalize-webpack-plugin/issues/57

rxaviers commented 7 years ago

Given the importance of providing decent support for webpack 2, I've just released v1.0.0.