From 1ea67b3e70edefca60818af79371b8fb05550bc7 Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Mon, 30 Apr 2018 17:48:58 -0400 Subject: [PATCH] chore(package): expose src/index as browser entry point Downstream webpack will need any dependencies src/ depends on so it can successfully build. Also if multiple packages being built into a larger script share a common dependency version range, they can share the dependency instead of duplicating it. This will save built file size, execution time, and memory. --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index aad23f21..ed5a0e93 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "2.0.0", "description": "Localization for the Scratch 3.0 components", "main": "./dist/l10n.js", + "browser": "./src/index.js", "bin": { "build-i18n-src": "./scripts/build-i18n-src.js" }, @@ -28,7 +29,8 @@ "dependencies": { "babel-cli": "^6.26.0", "babel-plugin-intl": "^0.1.1", - "babel-plugin-react-intl": "^2.3.1" + "babel-plugin-react-intl": "^2.3.1", + "react-intl": "2.4.0" }, "devDependencies": { "babel-core": "^6.26.0", @@ -44,7 +46,6 @@ "jsonlint": "1.6.3", "lodash.defaultsdeep": "4.6.0", "mkdirp": "^0.5.1", - "react-intl": "2.4.0", "rimraf": "^2.6.2", "webpack": "^4.6.0", "webpack-cli": "^2.0.15"