diff --git a/dune-project b/dune-project index fa180f87f..40cf7f7cb 100644 --- a/dune-project +++ b/dune-project @@ -40,7 +40,9 @@ reason-react-ppx (reason (>= 3.6.0)) - (ocaml-lsp-server :with-test))) + (ocaml-lsp-server :with-test) + (opam-check-npm-deps + (= 1.0.0 :with-dev-setup)))) (package (name reason-react-ppx) diff --git a/package.json b/package.json index 1767cfa4a..1534d62f0 100644 --- a/package.json +++ b/package.json @@ -30,10 +30,6 @@ "react-dom": "^16.8.1", "react-test-renderer": "^16.13.1" }, - "peerDependencies": { - "react": "^16.8.1", - "react-dom": "^16.8.1" - }, "jest": { "moduleDirectories": [ "node_modules" diff --git a/reason-react.opam b/reason-react.opam index b8356ba73..1eda446b8 100644 --- a/reason-react.opam +++ b/reason-react.opam @@ -23,6 +23,7 @@ depends: [ "reason-react-ppx" "reason" {>= "3.6.0"} "ocaml-lsp-server" {with-test} + "opam-check-npm-deps" {"1.0.0" = with-dev-setup} "odoc" {with-doc} ] build: [ @@ -40,3 +41,7 @@ build: [ ] ] dev-repo: "git+https://github.com/reasonml/reason-react.git" +depexts: [ + ["react"] {npm-version = "^16.0.0"} + ["react-dom"] {npm-version = "^16.0.0"} +] diff --git a/reason-react.opam.template b/reason-react.opam.template new file mode 100644 index 000000000..d19261ae8 --- /dev/null +++ b/reason-react.opam.template @@ -0,0 +1,4 @@ +depexts: [ + ["react"] {npm-version = "^16.0.0"} + ["react-dom"] {npm-version = "^16.0.0"} +]