Files
react/compiler/packages/react-compiler-runtime/package.json
Lauren Tan 67ea821e5f [publish] Fix files field for packages, invalid version range
The [`files` field](https://docs.npmjs.com/cli/v10/commands/npm-publish#files-included-in-package)
controls what files get included in the published package.

This PR specifies the `files` field on our publishable packages to only
include the `dist` directory, since we don't need to ship any types or
sourcemaps with 3 of them.

react-compiler-runtime is a runtime package which has sourcemaps, so we
also include the `src` directory in the published package.

Also fixes an invalid version range for the react peer dependency in
react-compiler-runtime, tested that it works via https://semver.npmjs.com/

ghstack-source-id: 12b36c203fc9fd8d72a1995fb3fba2312de4aa51
Pull Request resolved: https://github.com/facebook/react-forget/pull/2965
2024-05-14 11:02:29 -04:00

19 lines
375 B
JSON

{
"name": "react-compiler-runtime",
"version": "0.0.1",
"description": "Runtime for React Compiler",
"license": "MIT",
"main": "dist/index.js",
"files": [
"dist",
"src"
],
"peerDependencies": {
"react": "^18.2.0 || ^19.0.0"
},
"scripts": {
"build": "rimraf dist && rollup --config --bundleConfigAsCjs",
"test": "echo 'no tests'"
}
}