Socket
Socket
Sign inDemoInstall

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.1 to 0.7.2

1

dist/index.d.ts

@@ -73,2 +73,3 @@ import { Plugin } from 'vite';

dirs: string[];
resolvedDirs: string[];
globs: string[];

@@ -75,0 +76,0 @@ };

9

dist/index.js

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

}
function resolveOptions(options) {
function resolveOptions(options, viteConfig) {
const resolved = Object.assign({}, defaultOptions, options);

@@ -137,2 +137,3 @@ resolved.libraries = toArray(resolved.libraries).map((i) => typeof i === "string" ? {name: i} : i);

resolved.dirs = toArray(resolved.dirs);
resolved.resolvedDirs = resolved.dirs.map((i) => _path.resolve.call(void 0, viteConfig.root, i));
resolved.globs = resolved.dirs.map((i) => resolved.deep ? slash(_path.join.call(void 0, i, `**/*.${extsGlob}`)) : slash(_path.join.call(void 0, i, `*.${extsGlob}`)));

@@ -144,6 +145,6 @@ if (!resolved.extensions.length)

function getNameFromFilePath(filePath, options) {
const {dirs, directoryAsNamespace, globalNamespaces} = options;
const {resolvedDirs, directoryAsNamespace, globalNamespaces} = options;
const parsedFilePath = _path.parse.call(void 0, filePath);
let strippedPath = "";
for (const dir of dirs) {
for (const dir of resolvedDirs) {
if (parsedFilePath.dir.startsWith(dir)) {

@@ -214,3 +215,3 @@ strippedPath = parsedFilePath.dir.slice(dir.length);

this._searched = false;
this.options = resolveOptions(options);
this.options = resolveOptions(options, viteConfig);
const {globs, dirs} = this.options;

@@ -217,0 +218,0 @@ if (viteConfig.command === "serve") {

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

@@ -22,4 +22,4 @@ "module": "dist/index.mjs",

"dev": "npm run build -- --watch",
"example:dev": "npm -C example run dev",
"example:build": "npm -C example run build",
"example:dev": "npm -C example/basic run dev",
"example:build": "npm -C example/basic run build",
"build": "tsup src/index.ts --dts --format cjs,esm",

@@ -26,0 +26,0 @@ "prepublishOnly": "npm run build",

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