use-vue
v1.0.4
Published
Declare 'use vue' in Atom as 'use babel'.
Downloads
33
Maintainers
Readme
use-vue
Declare
use vue
in Atom asuse babel
.
Getting started
$ npm install --save use-vue
Usage
import 'use-vue';
import app from './app.vue';
console.log(app);
CSP
CSP
is Content Security Policy
. In Atom
, it would occur.
new Vue(app).$mount('app'); // CSP Error
You can import Vue
from use-vue
.
import { Vue } from 'use-vue';
import app from './app.vue';
new Vue(app).$mount('app');
Or, use loophole to avoid this problem.
import 'use-vue';
import Vur from 'vue'; // select the Vue version you want.
import app from './app.vue';
import { allowUnsafeNewFunction } from 'loophole';
allowUnsafeNewFunction(() => {
new Vue(app).$mount('app');
});
Language
As Atom
default, support this following language,
<script lang="ts">
// code
</script>
<script lang="babel">
// code
</script>
<script lang="coffee">
// code
</script>
<style lang="less">
// code
</style>
If you want to use any language else, you can register yourself. @see
License
MIT