-
Notifications
You must be signed in to change notification settings - Fork 133
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
fixed empty/no script tag in vue component error #192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution. Could you please use this example and also some variation of it in the snapshot tests?
<template>
<div>
<span>hello world
</span></div>
</template>
<script>
// I am top level comment in this file.
// I am second line of top level comment in this file.
import threeLevelRelativePath from '../../../threeLevelRelativePath';
import sameLevelRelativePath from './sameLevelRelativePath';
import thirdParty from 'third-party';
import React from 'react';
export { random } from './random';
import oneLevelRelativePath from '../oneLevelRelativePath';
import otherthing from '@core/otherthing';
import twoLevelRelativePath from '../../twoLevelRelativePath';
import component from '@ui/hello';
export default {
title: 'hello',
};
import fourLevelRelativePath from '../../../../fourLevelRelativePath';
import something from '@server/something';
function add(a, b) {
return a + b;
}
</script>
<style>
div { color: red; }
</style>
These kinds of tests help us to catch unwanted changes through out the code.
Thank 👍
@byara From the looks it seems that there are already a few examples/variations of a standard component in the snapshots, so instead I've added the bug offending scenario (a component with no script tag). Is that all good? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes 👍
Released in v4.1.0. I appreciate your patience. ❤️ |
This should fix #191 if I've understood what
vue-preprocessor.ts
doesIf there is no script value, just return the code as is