Closed gongph closed 7 years ago
same
ERROR in ./src/framework7-vue.js
Module build failed: SyntaxError: 'with' in strict mode (20:36)
18 | }(this, (function () {
19 |
> 20 | var StatusBar = {render: function(){with(this){return _m(0)}},staticRenderFns: [function(){with(this){return _h('div',{staticClass:"statusbar-overlay"})}}],};
| ^
21 |
22 | var Panel = {render: function(){with(this){return _h('div',{staticClass:"panel",class:classesObject,style:({'display': opened ? 'block' : ''}),on:{"open":onOpen,"opened":onOpened,"close":onClose,"closed":onClosed}},[_t("default")])}},staticRenderFns: [],
23 | props: {
@ ./src/main.js 15:21-56
你的问题解决了吗? @evolutionjay
@gongph No.
It is a problem of Vue itself, just don't include this plugin in a bundle, include it as a separate file
No! it's not vue's problem.
When I compile the templates, then bundle them by rollupjs, it will throw a error 'with' in strict mode. How can I handle this? @nolimits4web
with
is not allowed in strict mode or inside ES2015 modules, but this doesn't mean it's deprecated or that it's not valid ES2015.
the problem is with vue-template-compilier that generate code using "with" statement. It is valid, but webpack through errors when you try to import it
@evolutionjay #11
It is fixed now with the new release of Vue
with in strict mode