after.js icon indicating copy to clipboard operation
after.js copied to clipboard

Razzle as dev dependency?

Open topas opened this issue 3 years ago • 5 comments

🚀 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?

topas avatar Jan 10 '21 15:01 topas

+1. I encountered this problem while trying to containerize a AfterJS app. Having to add razzle and all its dependencies into a production build makes the container image very big (due to all of the dependencies of razzle like babel etc.).

+1. I encountered this issue as well as when testing out the examples provided it uses 1 major version behin of razzle and even no longer works once all additional dependencies are added.

stevengrimaldo avatar Jun 13 '21 02:06 stevengrimaldo

your point is totally valid, I'm going to use tsdx for repo after.js package it contains necessary utils for logging ....

nimaa77 avatar Oct 30 '21 17:10 nimaa77

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 01:01 stale[bot]

Can we please reopen this?