Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical Dependency Warning #627

Open
Maanil-Verma-WIN opened this issue Jul 2, 2023 · 1 comment
Open

Critical Dependency Warning #627

Maanil-Verma-WIN opened this issue Jul 2, 2023 · 1 comment

Comments

@Maanil-Verma-WIN
Copy link

Maanil-Verma-WIN commented Jul 2, 2023

I am working with NextJS 13, Material UI, and TypeScript & I am getting this warning in my VS Code Terminal Again and again.

warn  - ./node_modules/liquidjs/dist/liquid.node.cjs.js
**Critical dependency: require function is used in a way in which dependencies cannot be statically extracted**

Import trace for requested module:
./node_modules/liquidjs/dist/liquid.node.cjs.js
./shared-components/ComponentA.tsx
./shared-components/ComponentB.tsx
./shared-components/ComponentC.tsx
./shared-components/ComponentD.tsx
./app/components/(dashboard-app)/dashboard/components/ComponentE.tsx
./app/component/(dashboard-app)/dashboard/ComponentF.tsx
@harttle
Copy link
Owner

harttle commented Jul 2, 2023

It's related to a functionality to load partial templates via require.resolve, we'll have an option to remove this functionality in the next major release. Need more discussion on this.

There's a way to mitigate the warning from stackoverflow, add a plugin to Webpack config:

  plugins: [
    new ContextReplacementPlugin(/liquidjs/)
  ],

See a demo config here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants