Closed rangeoshun closed 3 years ago
@rangeoshun Thanks for the heads up!
We put together a CLI to git clone and customize this boilerplate. Using it will eliminate this problem. It's called create-react-crx.
npx create-react-crx
I've also added some warnings to the readme, just in case.
Expected Behavior / Situation
Running
npm run release
should produce an artefact in thereleases
folder.Actual Behavior / Situation
Because the
name
in thepackage.json
starts with@extend-chrome/
thezip({ dir: 'releases' })
call doesn't produce the artefact. It's because of how it generates names:So no modern namespaced package names work.
Modification Proposal
I see two ways of solving this.
Update the rollup config
Recommending manual name generation would solve the confusing behaviour. I concatenate package name and version but run it through a
_.snakeCase
call, which ensures a valid filename.Update README.md
A note/warning should be added to the README.md to help users mitigate this problem.