Skip to content

Support "react-intl/locale-data/*" module imports #277

Closed

Description

@ericf

It should be possible to have code that looks like the following and have it work in Node.js and when bundled for the browser using Browserify/Rollup/Webpack:

import {addLocaleData} from 'react-intl';
import english from 'react-intl/locale-data/en';
import spanish from 'react-intl/locale-data/es';

addLocaleData(english);
addLocaleData(spanish);

According to #249, these module names don't appear to resolve. This is likely because main in package.json is set to ./lib/react-intl.js instead of ./lib/index.js. I'm unsure how the browser field in package.json will affect the resolution of 'react-intl/locale-data/*' when bundling with Browserify/Rollup/Webpack… so that'll need to be tested.

Activity

  1. added 4 commits that reference this issue on Jan 13, 2016
    1dc62da
    3575e9e
    5f1397f
    36bd26e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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