Magento 2 静态缓存

Magento 2 static cache

当我在模板中更改某些内容时,我需要刷新静态缓存(pub/static),因为我在前端没有看到任何更改,但之后这个文件夹有一些空文件夹和在前端我有一些错误 ReferenceError: require is not defined,我需要使用这个命令 c:\xampp\php\php.exe -f d:\projects\localsites\magento2.local\magento\bin\magento -- setup:static-content:deploy 来生成静态内容。也许我做错了什么?

当你为 magento2 开发东西时,你应该启用 developer mode 并且静态不会有缓存并且会生成所有请求。

More about Magento 2 mods you can read on this page.