jaredpalmer/after.js

Razzle as dev dependency?

Aperta

#419 aperta il 10 gen 2021

 (5 commenti) (4 reazioni) (0 assegnatari)TypeScript (195 fork)github user discovery
after.jsgood first issue

Metriche repository

Star
 (4090 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

🚀 Feature request

All Razzle examples use Razzle package as dev dependency. Except AfterJS - it needs Razzle as regular dependency because of razzle-dev-utils.

Current Behavior

If Razzle stays as a dev dep, I get this error message in production build:

Error: Cannot find module 'razzle-dev-utils/logger'
 Require stack:
 -  /app/node_modules/@jaredpalmer/after/build/cjs/getAssets.js
 - /app/node_modules/@jaredpalmer/after/build/cjs/render.js
 - /app/node_modules/@jaredpalmer/after/build/cjs/index.js

Desired Behavior

I would like to add AfterJS to my Razzle based project without moving Razzle from dev to regular dependencies.

Suggested Solution

Is using razzle-dev-utils in AfterJS worth? Can it be replaced with something?

Guida contributor