From 83b1e9b8f002e16542efdac028d53b30e5396ecb Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Thu, 7 Jul 2022 13:54:13 +1000 Subject: [PATCH] Export main and module targets --- package.json | 23 ++++++++++------------- yarn.lock | 5 ----- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index c0a7bbd..a6b7ca7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stevent-team/react-qr-hunter", - "version": "0.0.1", + "version": "0.0.2", "description": "A QR code scanner for React", "keywords": [ "qr", @@ -13,26 +13,23 @@ "repository": "https://github.com/stevent-team/react-qr-hunter", "author": "Stevent team (https://stevent.club)", "license": "MIT", - "library": "dist/index.js", + "main": "dist/main.js", + "module": "dist/module.js", "example": "dist-example/index.html", "targets": { - "library": { - "source": "src/index.js", - "context": "browser", - "outputFormat": "commonjs", - "isLibrary": true, - "includeNodeModules": { - "react": false - } + "main": { + "source": "src/index.js" + }, + "module": { + "source": "src/index.js" }, "example": { "source": "example/index.html" } }, "scripts": { - "build": "parcel build --target library", - "dev": "parcel --target example", - "example": "parcel build --target example" + "build": "parcel build", + "dev": "parcel --target example" }, "dependencies": { "qr-scanner": "^1.4.1" diff --git a/yarn.lock b/yarn.lock index cd0ae38..da4ab6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1279,11 +1279,6 @@ posthtml@^0.16.4, posthtml@^0.16.5: posthtml-parser "^0.11.0" posthtml-render "^3.0.0" -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - qr-scanner@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/qr-scanner/-/qr-scanner-1.4.1.tgz#31a1bf7f9927f0eb1e3c0909fe66fec97a3b3701"