vue-inbrowser-compiler
Advanced tools
Comparing version 4.62.2 to 4.64.1
# Change Log | ||
## 4.64.1 | ||
### Patch Changes | ||
- [#1513](https://github.com/vue-styleguidist/vue-styleguidist/pull/1513) [`1b178cad`](https://github.com/vue-styleguidist/vue-styleguidist/commit/1b178cad6a4d2f3e55bc8221f3a344c0031be908) Thanks [@elevatebart](https://github.com/elevatebart)! - fix preprocessing of script setup | ||
- Updated dependencies [[`1b178cad`](https://github.com/vue-styleguidist/vue-styleguidist/commit/1b178cad6a4d2f3e55bc8221f3a344c0031be908)]: | ||
- vue-inbrowser-compiler-utils@4.64.1 | ||
## 4.62.2 | ||
@@ -4,0 +13,0 @@ |
@@ -178,3 +178,3 @@ 'use strict'; | ||
? { | ||
preprocessing: script, | ||
preprocessing: (script === null || script === void 0 ? void 0 : script.content) || '', | ||
component: parseScriptSetupCode(scriptSetup.content) | ||
@@ -181,0 +181,0 @@ } |
@@ -170,3 +170,3 @@ import { isVue3, parseComponent, transformOneImport, compileTemplateForEval, compileTemplateForEvalSetup, isCodeVueSfc } from 'vue-inbrowser-compiler-utils'; | ||
? { | ||
preprocessing: script, | ||
preprocessing: (script === null || script === void 0 ? void 0 : script.content) || '', | ||
component: parseScriptSetupCode(scriptSetup.content) | ||
@@ -173,0 +173,0 @@ } |
{ | ||
"name": "vue-inbrowser-compiler", | ||
"version": "4.62.2", | ||
"version": "4.64.1", | ||
"description": "compile vue single file components right in your browser", | ||
@@ -22,3 +22,3 @@ "module": "lib/vue-inbrowser-compiler.esm.js", | ||
"detect-browser": "^5.2.0", | ||
"vue-inbrowser-compiler-utils": "^4.62.1", | ||
"vue-inbrowser-compiler-utils": "^4.64.1", | ||
"walkes": "^0.2.1" | ||
@@ -25,0 +25,0 @@ }, |
/* eslint-disable no-new-func */ | ||
import { expect } from 'vitest' | ||
import { describe, it, vi, expect } from 'vitest' | ||
import compileVueCodeForEvalFunction from './compileVueCodeForEvalFunction' | ||
@@ -190,2 +190,22 @@ | ||
}) | ||
it('should handle 2 script tags', () => { | ||
let sut = compileVueCodeForEvalFunction(` | ||
<template> | ||
<div>{{ value }}</div> | ||
</template> | ||
<script> | ||
function foo() { | ||
return 1 | ||
} | ||
</script> | ||
<script setup> | ||
import { ref } from 'vue' | ||
const value = ref(foo()) | ||
</script>`) | ||
expect(() => new Function(sut.script)()).not.toThrow() | ||
}) | ||
}) |
@@ -160,3 +160,3 @@ import walkes from 'walkes' | ||
? { | ||
preprocessing: script, | ||
preprocessing: script?.content || '', | ||
component: parseScriptSetupCode(scriptSetup.content) | ||
@@ -163,0 +163,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85348
1883