framework7io / framework7-vue

Deprecated! Build full featured iOS & Android apps using Framework7 & Vue
http://framework7.io/vue/
MIT License
674 stars 151 forks source link

error in framework7-vue.js #9

Closed gongph closed 7 years ago

gongph commented 7 years ago

with in strict mode

evolutionjay commented 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
gongph commented 7 years ago

你的问题解决了吗? @evolutionjay

evolutionjay commented 7 years ago

@gongph No.

nolimits4web commented 7 years ago

It is a problem of Vue itself, just don't include this plugin in a bundle, include it as a separate file

evolutionjay commented 7 years ago

No! it's not vue's problem.

nolimits4web commented 7 years ago

@evolutionjay https://github.com/vuejs/vue/search?q=with+in+strict+mode&type=Issues&utf8=%E2%9C%93

gongph commented 7 years ago

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

evolutionjay commented 7 years ago

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.

nolimits4web commented 7 years ago

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

gongph commented 7 years ago

@evolutionjay #11

nolimits4web commented 7 years ago

It is fixed now with the new release of Vue