'How to build a un-minified version of Shopware 6 administration scripts for debugging purpose?
I would like to debug the following not-very-helpful error message when trying to save a custom CMS component in Shopware 6 administration layout editor:
An error was captured in current module: undefined
errorCaptured @ app.js?16504701226454027:1
Xe @ vendors-node.js?16504701221582962:2
(anonymous) @ vendors-node.js?16504701221582962:2
Promise.catch (async)
Ge @ vendors-node.js?16504701221582962:2
n @ vendors-node.js?16504701221582962:2
o._wrapper @ vendors-node.js?16504701221582962:2
When having such problems in the store front, I usually modify build-storefront.sh to call
npm --prefix "${STOREFRONT_ROOT}"/Resources/app/storefront run development
instead of
npm --prefix "${STOREFRONT_ROOT}"/Resources/app/storefront run production
Now I want to adapt build-administration.sh in a similar way:
The original line is
(cd "${ADMIN_ROOT}"/Resources/app/administration && npm clean-install && npm run build)
When I change it to
(cd "${ADMIN_ROOT}"/Resources/app/administration && npm install && mode=development npm run dev)
I would call
"dev": "mode=development webpack-dev-server",
vendor/shopware/administration/Resources/app/administration/package.json
I do not want to use the dev server and changed this to
"dev": "mode=development webpack",
No the build runs, but I still get a minified app.js as a result.
How can I debug the initial problem further?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
