8000 feat: support <script setup> in Vue 2.7 (supersedes #483) by kiroushi · Pull Request #489 · vuejs/vue-jest · GitHub
[go: up one dir, main page]

Skip to content

feat: support <script setup> in Vue 2.7 (supersedes #483) #489

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

Merged
merged 12 commits into from
Sep 15, 2022
Prev Previous commit
Next Next commit
fix: remove inline sourceMap in vue2 setup scripts
  • Loading branch information
kiroushi committed Sep 7, 2022
commit cb740dce4a1ec7c3032a8e2f2d740bf922637358
11 changes: 1 addition & 10 deletions packages/vue2-jest/lib/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function processScriptSetup(descriptor, filePath, config) {
)

const result = transformer.process(content.content, filePath, config)
result.code = stripInlineSourceMap(result.code)
result.map = mapLines(contentMap, result.map)

return result
Expand Down Expand Up @@ -158,16 +159,6 @@ module.exports = function(src, filename, config) {
filename
)

const map = generateSourceMap(
scriptResult,
scriptSetupResult,
src,
filename,
output.renderFnStartLine,
output.renderFnEndLine,
templateLine
).toJSON()

return {
code: output.code,
map
Expand Down
0