Skip to content

Bundling with Webpack doesn't work well #441

@jquense

Description

@jquense

congrats on 1.0! been waiting a long time to use the shiney new globalize :)

I have been running into issues using Globalize with webpack ( browserify may suffer similarly).

ERROR in ./~/globalize/dist/globalize/number.js
Module not found: Error: Cannot resolve module 'cldr' in \node_modules\globalize\dist\globalize

Investigation shows that this is due to the AMD check running first in the UMD wrapper for the files, since the package has been installed from npm there is no cldr package for webpack to find. there is a cldrjs however and if I tell webpack to ignore amd style modules for globalize it works just fine.

The problem is that as a library author using Globalize and publishing to npm I can't ask consumers of my module to add a special exemption to there build process in order to get my module to load. I am not sure what the best way to "fix" this is other then building a commonjs (or amd) only version of globalize that gets published to npm, instead of the general /dist build that works for both bower and npm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions