imodeljs / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
2 stars 7 forks source link

add env DISABLE_COPY_ASSETS to provide a way to skip copying bentley package assets #86

Closed jason-crow closed 1 year ago

jason-crow commented 1 year ago

add env DISABLE_COPY_ASSETS to provide a way to skip copying bentley package assets

calebmshafer commented 1 year ago

@jason-crow is the copy plugin not working for you? Or do you want to manually copy?

jason-crow commented 1 year ago

@jason-crow is the copy plugin not working for you? Or do you want to manually copy?

It doesn't work because it assumes all the package deps are in the node_modules of the app, but in our case since we have a lerna monorepo many of them are at the repo root. We already have our own copy script to handle these assets so we don't need this feature, but an alternative would be to support handling more than one node_modules path. I just thought it would be simpler to add a way to skip it for now

aruniverse commented 1 year ago

what does the following evaluate to in your repo?

require.resolve(`${paths.appNodeModules}/${dependency}/package.json`)
jason-crow commented 1 year ago

what does the following evaluate to in your repo?

require.resolve(`${paths.appNodeModules}/${dependency}/package.json`)

It resolves to TCDEAppService/packages/apps/reviewAndApproval/client/node_modules/**/package.json but most of the deps are actually found at TCDEAppService/node_modules/**/package.json (but not all)

aruniverse commented 1 year ago

Stupid yarn :(