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-beta.8 to 6.0.0-beta.9

dist/utils.d.ts

75

dist/index.js

@@ -136,2 +136,29 @@ "use strict";

const block = descriptor.styles[query.index];
let preprocessOptions = options.preprocessOptions || {};
const preprocessLang = (options.preprocessStyles
? block.lang
: undefined);
if (preprocessLang) {
preprocessOptions =
preprocessOptions[preprocessLang] || preprocessOptions;
// include node_modules for imports by default
switch (preprocessLang) {
case 'scss':
case 'sass':
preprocessOptions = {
includePaths: ['node_modules'],
...preprocessOptions,
};
break;
case 'less':
case 'stylus':
preprocessOptions = {
paths: ['node_modules'],
...preprocessOptions,
};
}
}
else {
preprocessOptions = {};
}
const result = await compiler_sfc_1.compileStyleAsync({

@@ -147,7 +174,5 @@ filename: query.filename,

modulesOptions: options.cssModulesOptions,
preprocessLang: options.preprocessStyles
? block.lang
: undefined,
preprocessLang,
preprocessCustomRequire: options.preprocessCustomRequire,
preprocessOptions: options.preprocessOptions || {},
preprocessOptions,
});

@@ -247,3 +272,3 @@ if (result.errors.length) {

cache.set(id, descriptor);
return { descriptor, errors };
return { descriptor, errors: errors };
}

@@ -362,17 +387,27 @@ function transformVueSFC(code, resourcePath, descriptor, { rootContext, isProduction, isServer, filterCustomBlock, }, options) {

function createRollupError(id, error) {
return {
id,
plugin: 'vue',
pluginCode: String(error.code),
message: error.message,
frame: error.loc.source,
parserError: error,
loc: error.loc
? {
file: id,
line: error.loc.start.line,
column: error.loc.start.column,
}
: undefined,
};
if ('code' in error) {
return {
id,
plugin: 'vue',
pluginCode: String(error.code),
message: error.message,
frame: error.loc.source,
parserError: error,
loc: error.loc
? {
file: id,
line: error.loc.start.line,
column: error.loc.start.column,
}
: undefined,
};
}
else {
return {
id,
plugin: 'vue',
message: error.message,
parserError: error,
};
}
}

@@ -379,0 +414,0 @@ // these are built-in query parameters so should be ignored

{
"name": "rollup-plugin-vue",
"version": "6.0.0-beta.8",
"version": "6.0.0-beta.9",
"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