Custom scss in Storefront Shopware 6.1

huangapple go评论93阅读模式
英文:

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

Custom scss in Storefront Shopware 6.1

就我所看,路径应该是:

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

Custom scss in Storefront Shopware 6.1

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.

huangapple
  • 本文由 发表于 2020年1月3日 16:34:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/59575366.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定