英文:
Custom scss in Storefront Shopware 6.1
问题
我在加载我的Shopware 6.1商店插件时遇到了问题。理论上,只需将文件放到正确的位置,它就应该自动工作。但是,由于目录结构的更改,6.1中的正确位置是什么还不清楚。Shopware文档尚未更新。
我尝试了以下位置:
plugin-root/src/Resources/app/storefront/src/style
plugin-root/src/Resources/app/storefront/style
但都不起作用。
到目前为止,我是通过Webpack导入方式加载我的scss文件的,但只有在更改Webpack配置后才起作用。所以我想这不是推荐的方式。
英文:
I have trouble to load my scss Files for my shopware 6.1 Storefront Plugin.
It should work automatically by placing the files in the right location. But there is the correct location now in 6.1 with the changes to the directory stucture. The shopware documentation was not updated.
I tried:
plugin-root/src/Resources/app/storfront/src/style
and
plugin-root/src/Resources/app/storfront/style
But it doesn't work.
So far I load my scss with webpack import, but it only worked after changing the webpack config. So I guess this is not the recommended way.
答案1
得分: 1
你是否尝试了正确的路径?在你的消息中有一个拼写错误 - 不是"storfront",而是"storefront"。
从Shopware 6.1的官方changelog.md中获取的信息:https://github.com/shopware/platform/blob/6.1/CHANGELOG-6.1.md
就我所看,路径应该是:
plugin/src/Resources/app/storefront/src/scss
示例插件也应该显示这个路径:https://github.com/shopware/swag-docs-storefront-assets/tree/master/src/Resources/app/storefront/scss
英文:
Did you tried the correct path? In your message is a spelling error - it's not "storfront", but "storefront".
From the official changelog.md of shopware 6.1: https://github.com/shopware/platform/blob/6.1/CHANGELOG-6.1.md
As fas as I can see, the path should be:
plugin/src/Resources/app/storefront/src/scss
The example plugin should show it too: https://github.com/shopware/swag-docs-storefront-assets/tree/master/src/Resources/app/storefront/scss
答案2
得分: 0
这是SCSS而不是样式,谢谢,这很有效。
英文:
It is scss not style, thanks, that works.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论