Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-components

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-components - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

4

dist/index.d.ts

@@ -62,2 +62,6 @@ import { Plugin } from 'vite';

/**
* Apply custom transform over the path for importing
*/
importPathTransform?: (path: string) => string | undefined;
/**
* Transformer to apply

@@ -64,0 +68,0 @@ *

14

dist/index.js

@@ -72,3 +72,4 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __assign = Object.assign;

customLoaderMatcher: () => false,
customComponentResolvers: []
customComponentResolvers: [],
importPathTransform: (v) => v
};

@@ -123,3 +124,8 @@

}
function stringifyComponentImport({name, path, importName}) {
function stringifyComponentImport({name, path, importName}, ctx) {
if (ctx.options.importPathTransform) {
const result = ctx.options.importPathTransform(path);
if (result != null)
path = result;
}
if (importName)

@@ -366,3 +372,3 @@ return `import { ${importName} as ${name} } from '${path}'`;

const var_name = `__vite_components_${no}`;
head.push(stringifyComponentImport(__assign(__assign({}, component), {name: var_name})));
head.push(stringifyComponentImport(__assign(__assign({}, component), {name: var_name}), ctx));
no += 1;

@@ -403,3 +409,3 @@ return var_name;

const var_name = `__vite_components_${no}`;
head.push(stringifyComponentImport(__assign(__assign({}, component), {name: var_name})));
head.push(stringifyComponentImport(__assign(__assign({}, component), {name: var_name}), ctx));
no += 1;

@@ -406,0 +412,0 @@ return `_c(${var_name}${append}`;

{
"name": "vite-plugin-components",
"description": "Components auto importing for Vite",
"version": "0.7.2",
"version": "0.7.3",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

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