Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't change delimiters when build for production #132

Closed
libotony opened this issue Jan 14, 2016 · 1 comment
Closed

can't change delimiters when build for production #132

libotony opened this issue Jan 14, 2016 · 1 comment

Comments

@libotony
Copy link

I use swig and Vue.js together in a express application, so I change Vue's delimiters like below:

Vue.config.delimiters = ['<<','>>'];
Vue.config.unsafeDelimiters = ['<<<', '>>>'];

I use webpack-dev-server for hot reloading when developing,this works fine,but when I run wepback -p,there is an error,so I change the delimiters to default value,it works fine.

Any suggestions?

// index.js
var Vue = require('vue');
var list = require('./components/list.vue');

Vue.config.delimiters = ['<<','>>'];
Vue.config.unsafeDelimiters = ['<<<', '>>>'];

var vm = new Vue({
  el: 'div.list',
  data: {
    items : []
  },
  components :{
    list : list
  }
});

//list.vue
<template>
  <div>
    <div class="item"  v-for="item in items" track-by="_id">
          <p><< item.name >></p>
    </div>
  </div>
</template>
<script>
  module.exports = {
    props:['items']
  }
</script>
@libotony
Copy link
Author

I think I konw why,<and>are key charactors to vue-html-loader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant