You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was trying to import another twig template by using template path inside a twig variable
both of these code snippet are failing to do so (while in Drupal 10 twig it's woking fine):
Snippet 1
{% set test = "./components/code-snippet/code-snippet.twig" %}
{% include(test) %}
Snippet 2
{% set test = "./components/code-snippet/code-snippet.twig" %}
{% include test %}
Throwing below error:
ModuleBuildError: Module build failed (from ./node_modules/twigjs-loader/index.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) TwigException: Unable to parse 'include(test)'
at processResult (/app/node_modules/webpack/lib/NormalModule.js:761:12)
at /app/node_modules/webpack/lib/NormalModule.js:866:5
at /app/node_modules/loader-runner/lib/LoaderRunner.js:400:11
at /app/node_modules/loader-runner/lib/LoaderRunner.js:252:18
at runSyncOrAsync (/app/node_modules/loader-runner/lib/LoaderRunner.js:156:3)
at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
at /app/node_modules/loader-runner/lib/LoaderRunner.js:224:4
at /app/node_modules/webpack/lib/NormalModule.js:840:15
at Array.eval (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
at runCallbacks (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:15)
at /app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:249:5
at /app/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
at processResult (/app/node_modules/webpack/lib/NormalModule.js:764:19)
at /app/node_modules/webpack/lib/NormalModule.js:866:5
at /app/node_modules/loader-runner/lib/LoaderRunner.js:400:11
at /app/node_modules/loader-runner/lib/LoaderRunner.js:252:18
at runSyncOrAsync (/app/node_modules/loader-runner/lib/LoaderRunner.js:156:3)
at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
at /app/node_modules/loader-runner/lib/LoaderRunner.js:224:4
at /app/node_modules/webpack/lib/NormalModule.js:840:15
at Array.eval (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
at runCallbacks (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:15)
at /app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:249:5
at /app/node_modules/graceful-fs/graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
The text was updated successfully, but these errors were encountered:
Hi, I was trying to import another twig template by using template path inside a twig variable
both of these code snippet are failing to do so (while in Drupal 10 twig it's woking fine):
Snippet 1
Snippet 2
Throwing below error:
The text was updated successfully, but these errors were encountered: