我正在使用gulp,browserify和babelify,以便在我的项目中使用ES6语法。导入同样也是用ES6编写的node_module时,gulp抛出错误:'import' and 'export' may appear only with 'sourceType: module'
我已经在babelify的github页面上阅读了建议的解决方案。简而言之,两种可能性是:
第一种选择将阻止其他人克隆我的项目并使它立即启动并运行。有没有解决方法,也许使用npm postinstall脚本?
第二种选择似乎有点过分。有没有更优雅的解决方案呢?
我试图将自定义插件的模板包含在Shopware 5.2 的自定义主题中。
主题模板包含以下行:
{include file="frontend/custom/colorpicker.tpl"}
Run Code Online (Sandbox Code Playgroud)
插件模板位于/custom/plugins/PLUGINNAME/Resources/views/frontend/custom/colorpicker.tpl
我收到以下错误消息:
致命错误:未捕获的 SmartyException:无法在“frontend/detail/index.tpl|frontend/plugins/seo/index.tpl”中加载模板片段“frontend/custom/colorpicker.tpl”...
我已经尝试将父级添加到文件路径,但没有任何乐趣。错误消息消失,但模板未加载:
{include file="parent:frontend/custom/colorpicker.tpl"}
Run Code Online (Sandbox Code Playgroud)
不幸的是,我在 Shopware 文档中找不到任何内容,说明是否需要任何特殊内容才能包含插件中的模板。
browserify ×1
ecmascript-6 ×1
gulp ×1
node.js ×1
npm ×1
php ×1
shopware ×1
smarty ×1
templates ×1