Skip to content

Commit

Permalink
chore: update playground/vue-sourcemap sourcemap
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Jun 26, 2022
1 parent 7aa6e58 commit 6d8cf6f
Show file tree
Hide file tree
Showing 2 changed files with 274 additions and 304 deletions.
265 changes: 264 additions & 1 deletion playground/vue-sourcemap/__tests__/__snapshots__/serve.spec.ts.snap
@@ -1,8 +1,102 @@
// Vitest Snapshot v1

exports[`serve:vue-sourcemap > css 1`] = `
{
"mappings": ";AAQA;EACE,UAAU;AACZ",
"sources": [
"/root/Css.vue",
],
"sourcesContent": [
"<template>
<p class=\\"css\\">&lt;css&gt;</p>
<p :class=\\"$style['css-module']\\">&lt;css&gt; module</p>
<p class=\\"css-scoped\\">&lt;css&gt; scoped</p>
<p class=\\"css-scoped-nested\\">&lt;css&gt; scoped with nested</p>
</template>
<style>
.css {
color: red;
}
</style>
<style module>
.css-module {
color: red;
}
</style>
<style scoped>
.css-scoped {
color: red;
}
</style>
<style scoped>
.css-scoped-nested {
color: red;
.dummy {
color: green;
}
font-weight: bold;
}
</style>
",
],
"version": 3,
}
`;

exports[`serve:vue-sourcemap > css scoped 1`] = `
{
"mappings": ";AAoBA;EACE,UAAU;AACZ",
"sources": [
"/root/Css.vue",
],
"sourcesContent": [
"<template>
<p class=\\"css\\">&lt;css&gt;</p>
<p :class=\\"$style['css-module']\\">&lt;css&gt; module</p>
<p class=\\"css-scoped\\">&lt;css&gt; scoped</p>
<p class=\\"css-scoped-nested\\">&lt;css&gt; scoped with nested</p>
</template>
<style>
.css {
color: red;
}
</style>
<style module>
.css-module {
color: red;
}
</style>
<style scoped>
.css-scoped {
color: red;
}
</style>
<style scoped>
.css-scoped-nested {
color: red;
.dummy {
color: green;
}
font-weight: bold;
}
</style>
",
],
"version": 3,
}
`;

exports[`serve:vue-sourcemap > js 1`] = `
{
"mappings": "mIAKA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;AAGP;AACd,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;wBARlB,oBAAiB,WAAd,MAAU",
"mappings": "AAKA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;AAGP;AACd,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;wBARlB,oBAAiB,WAAd,MAAU",
"sources": [
"/root/Js.vue",
],
Expand All @@ -23,3 +117,172 @@ console.log('setup')
"version": 3,
}
`;

exports[`serve:vue-sourcemap > less with additionalData 1`] = `
{
"mappings": "AAKA;EACE",
"sources": [
"/root/Less.vue",
],
"sourcesContent": [
"<template>
<p class=\\"less\\">&lt;less&gt; with additionalData</p>
</template>
<style lang=\\"less\\">
.less {
color: @color;
}
</style>
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > no script 1`] = `
{
"mappings": ";;;wBACE,oBAAwB,WAArB,aAAiB",
"sourceRoot": "",
"sources": [
"/root/NoScript.vue",
],
"sourcesContent": [
"<template>
<p>&lt;no-script&gt;</p>
</template>
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > no template 1`] = `
{
"mappings": "AACA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;AAGP;AACd,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;",
"sources": [
"/root/NoTemplate.vue",
],
"sourcesContent": [
"<script>
console.log('script')
</script>
<script setup>
console.log('setup')
</script>
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > sass 1`] = `
{
"mappings": "AAKA;EACE",
"sources": [
"/root/Sass.vue",
],
"sourcesContent": [
"<template>
<p class=\\"sass\\">&lt;sass&gt;</p>
</template>
<style lang=\\"sass\\">
.sass
color: red
</style>
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > sass with import 1`] = `
{
"mappings": "AAAA;EACE;;ACOF;EACE",
"sources": [
"/root/sassWithImportImported.sass",
"/root/SassWithImport.vue",
],
"sourcesContent": [
".sass-with-import-imported
color: red
",
"<template>
<p class=\\"sass-with-import\\">&lt;sass&gt; with import</p>
<p class=\\"sass-with-import-imported\\">&lt;sass&gt; with import (imported)</p>
</template>
<style lang=\\"sass\\">
@import './sassWithImportImported'
.sass-with-import
color: red
</style>
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > src imported 1`] = `
{
"mappings": "AAAA;EACE,UAAU;AACZ",
"sources": [
"/root/src-import/src-import.css",
],
"sourcesContent": [
".src-import {
color: red;
}
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > src imported sass 1`] = `
{
"mappings": "AAAA;EACE;;ACCF;EACE",
"sources": [
"/root/src-import/src-import-imported.sass",
"/root/src-import/src-import.sass",
],
"sourcesContent": [
".src-import-sass-imported
color: red
",
"@import './src-import-imported'
.src-import-sass
color: red
",
],
"version": 3,
}
`;
exports[`serve:vue-sourcemap > ts 1`] = `
{
"mappings": ";AAKA,QAAQ,IAAI,WAAW;;;;;AAIvB,YAAQ,IAAI,UAAU;;;;;;;;uBARpB,oBAAiB,WAAd,MAAU",
"sources": [
"/root/Ts.vue",
],
"sourcesContent": [
"<template>
<p>&lt;ts&gt;</p>
</template>
<script lang=\\"ts\\">
console.log('ts script')
</script>
<script lang=\\"ts\\" setup>
console.log('ts setup')
</script>
",
],
"version": 3,
}
`;

0 comments on commit 6d8cf6f

Please sign in to comment.