Socket
Socket
Sign inDemoInstall

rollup-plugin-vue

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-vue - npm Package Compare versions

Comparing version 6.0.0-alpha.5 to 6.0.0-alpha.6

15

dist/index.js

@@ -10,3 +10,3 @@ "use strict";

catch (e) {
throw new Error('vue-loader requires @vue/compiler-sfc to be present in the dependency ' +
throw new Error('rollup-plugin-vue requires @vue/compiler-sfc to be present in the dependency ' +
'tree.');

@@ -97,2 +97,3 @@ }

compiler: options.compiler,
ssr: isServer,
compilerOptions: {

@@ -214,3 +215,3 @@ ...options.compilerOptions,

}
function transformVueSFC(code, resourcePath, descriptor, { rootContext, isProduction, }, options) {
function transformVueSFC(code, resourcePath, descriptor, { rootContext, isProduction, isServer, }, options) {
const shortFilePath = path_1.relative(rootContext, resourcePath)

@@ -222,3 +223,3 @@ .replace(/^(\.\.[\/\\])+/, '')

const hasScoped = descriptor.styles.some((s) => s.scoped);
const templateImport = getTemplateCode(descriptor, resourcePath, id, hasScoped);
const templateImport = getTemplateCode(descriptor, resourcePath, id, hasScoped, isServer);
const scriptImport = getScriptCode(descriptor, resourcePath);

@@ -230,3 +231,3 @@ const stylesCode = getStyleCode(descriptor, resourcePath, id, options.preprocessStyles);

stylesCode,
`script.render = render`,
isServer ? `script.ssrRender = ssrRender` : `script.render = render`,
];

@@ -242,6 +243,6 @@ if (hasScoped) {

}
output.push('export default script');
output.push('import { defineComponent } from "vue"; export default defineComponent(script)');
return output.join('\n');
}
function getTemplateCode(descriptor, resourcePath, id, hasScoped) {
function getTemplateCode(descriptor, resourcePath, id, hasScoped, isServer) {
let templateImport = `const render = () => {}`;

@@ -256,3 +257,3 @@ let templateRequest;

templateRequest = _(src + query);
templateImport = `import { render } from ${templateRequest}`;
templateImport = `import { ${isServer ? 'ssrRender' : 'render'} } from ${templateRequest}`;
}

@@ -259,0 +260,0 @@ return templateImport;

{
"name": "rollup-plugin-vue",
"version": "6.0.0-alpha.5",
"version": "6.0.0-alpha.6",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc