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

vite-plugin-dynamic-import

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-dynamic-import - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

7

dist/dynamic-import-helper.js

@@ -22,8 +22,7 @@ "use strict";

})
}
}
`;
}
}
`;
return { name, body };
}
exports.generateDynamicImportRuntime = generateDynamicImportRuntime;

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

const allImportee = listAllImportee(globExtensions, files, startsWithAliasFiles);
const importRuntime = (0, dynamic_import_helper_1.generateDynamicImportRuntime)(allImportee, dynamicImportIndex);
const importRuntime = (0, dynamic_import_helper_1.generateDynamicImportRuntime)(allImportee, dynamicImportIndex++);
dynamicImportRecord.push({

@@ -71,3 +71,3 @@ node: {

}
const dyImptFnBody = dynamicImportRecord.map(e => e.importRuntime.body).join('\n');
const dyImptFnBody = dynamicImportRecord.map(e => e.importRuntime.body).join('');
// TODO: sourcemap

@@ -94,3 +94,3 @@ return code + `

glob = (0, utils_1.fixGlob)(glob) || glob;
// fill necessary ext
// if not extension is not specified, fill necessary extensions
// e.g. `../views/*` -> `../views/*{.js,.ts,.vue ...}`

@@ -97,0 +97,0 @@ if (!extensions.includes(path_1.default.extname(glob))) {

{
"name": "vite-plugin-dynamic-import",
"version": "0.3.1",
"version": "0.3.2",
"description": "Enhance Vite builtin dynamic import",

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

@@ -124,1 +124,5 @@ # vite-plugin-dynamic-import [![NPM version](https://img.shields.io/npm/v/vite-plugin-dynamic-import.svg)](https://npmjs.org/package/vite-plugin-dynamic-import) [![awesome-vite](https://awesome.re/badge.svg)](https://github.com/vitejs/awesome-vite)

```
## TODO
- [ ] support `alias.customResolver`

@@ -27,8 +27,7 @@ export interface DynamicImportRuntime {

})
}
}
`
}
}
`
return { name, body }
}

@@ -72,3 +72,3 @@ import path from 'path'

)
const importRuntime = generateDynamicImportRuntime(allImportee, dynamicImportIndex)
const importRuntime = generateDynamicImportRuntime(allImportee, dynamicImportIndex++)

@@ -93,3 +93,3 @@ dynamicImportRecord.push({

}
const dyImptFnBody = dynamicImportRecord.map(e => e.importRuntime.body).join('\n')
const dyImptFnBody = dynamicImportRecord.map(e => e.importRuntime.body).join('')

@@ -132,3 +132,3 @@ // TODO: sourcemap

// fill necessary ext
// if not extension is not specified, fill necessary extensions
// e.g. `../views/*` -> `../views/*{.js,.ts,.vue ...}`

@@ -135,0 +135,0 @@ if (!extensions.includes(path.extname(glob))) {

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