vue-parser icon indicating copy to clipboard operation
vue-parser copied to clipboard

Support Src Imports

Open hrysd opened this issue 6 years ago • 1 comments

This PR is to support Src Imports in .vue

example code

const parser = require('vue-parser')

const content = `<template>
  <div class='hoge'>
  </div>
</template>
<script lang='ts' src='./index.ts'></script>
`;

console.log(parser.parse(content, 'script', {lang: ['ts']}, {emptyExport: true}))

Before

// tslint:disable
//
//
//
                                             // tslint:enable

After

// tslint:disable
//
//
//
export { default } from './index'

hrysd avatar Jul 12 '18 05:07 hrysd

Hello, @prograhammer !

Could you take a look this PR so that we can move forward vue-cli v3 RC process by solving https://github.com/Realytics/fork-ts-checker-webpack-plugin/issues/111 and https://github.com/vuejs/vue-cli/issues/1104?

ktsn avatar Jul 14 '18 15:07 ktsn