-
Notifications
You must be signed in to change notification settings - Fork 72
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
How to configure vue in the project to have access to vue sourcemap in the browser #9
Comments
PrepareDownload vue source code and install yarn # install dep
yarn dev # build dist/vue.js Node.js Onlywrite your test code const Vue = require('./dist/vue.js');
const obj = {};
obj._data = {x:'x v',y:{z:'z v',v: 1}};
console.log(obj)
Vue.util.defineReactive(obj,'_data');
console.log(obj) run it node demo.js Now your can modify vue source code or With browserDo what official web site / official hello world told your but replace the url with your local generated file. Or follow the step below create a <!DOCTYPE html>
<html>
<header>
<title></title>
</header>
<body>
<div id="app"></div>
<script src="./dist/vue.js"></script>
<script src="./demo.js"></script>
</body>
</html> const vueObj = new Vue({
el: '#app',
template: '<div><div> y: {{ y }} </div><button @click="updateX(\'qwe\')"> update </button></div>',
data() {
return {
x: '123'
}
},
computed: {
y(){
return this.x+'456';
}
},
methods: {
updateX(v) {
this.x = v;
}
}
}) then open the html with your browser, and modify the code as you like |
Check the |
Thanks @CroMarmot this is really useful. Syntax Error: Error: Failed to load plugin 'flowtype' declared in 'src/vue/.eslintrc.js': Cannot find module 'eslint-plugin-flowtype'. I have tried globally install this plugin but error is still the same. Here is how I am importing vue
|
This works fine for me too.
|
Do you have any tip how can I run all these flows in browser, using debugger?
I have tried cloning the vue project and import
vue
, but no luck!Why searching around I stumbled on the great repo, do you have any tip how can I do this?
Thanks
The text was updated successfully, but these errors were encountered: