Socket
Socket
Sign inDemoInstall

imports-loader

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imports-loader - npm Package Compare versions

Comparing version 3.1.1 to 4.0.0

36

package.json
{
"name": "imports-loader",
"version": "3.1.1",
"version": "4.0.0",
"description": "imports loader module for webpack",

@@ -16,3 +16,3 @@ "license": "MIT",

"engines": {
"node": ">= 12.13.0"
"node": ">= 14.15.0"
},

@@ -48,24 +48,24 @@ "scripts": {

"devDependencies": {
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"@commitlint/cli": "^14.1.0",
"@commitlint/config-conventional": "^14.1.0",
"@babel/cli": "^7.17.10",
"@babel/core": "^7.17.10",
"@babel/preset-env": "^7.17.10",
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^27.3.1",
"babel-loader": "^8.2.2",
"babel-jest": "^28.1.0",
"babel-loader": "^8.2.5",
"cross-env": "^7.0.3",
"del": "^6.0.0",
"del-cli": "^4.0.1",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.2",
"husky": "^7.0.0",
"jest": "^27.3.1",
"lint-staged": "^11.0.0",
"memfs": "^3.2.2",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"husky": "^8.0.1",
"jest": "^28.1.0",
"lint-staged": "^12.4.1",
"memfs": "^3.4.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.0",
"prettier": "^2.6.2",
"standard-version": "^9.3.0",
"webpack": "^5.37.0"
"webpack": "^5.72.1"
},

@@ -72,0 +72,0 @@ "keywords": [

@@ -34,5 +34,17 @@ <div align="center">

```console
$ npm install imports-loader --save-dev
npm install imports-loader --save-dev
```
or
```console
yarn add -D imports-loader
```
or
```console
pnpm add -D imports-loader
```
Given you have this file:

@@ -188,12 +200,15 @@

| Name | Type | Default | Description |
| :-------------------------------------: | :---------------------------------------: | :---------: | :--------------------------------------------------------------------- |
| **[`type`](#type)** | `{String}` | `module` | Format of generated imports |
| **[`imports`](#imports)** | `{String\|Object\|Array<String\|Object>}` | `undefined` | List of imports |
| **[`wrapper`](#wrapper)** | `{Boolean\|String\|Object}` | `undefined` | Closes the module code in a function (`(function () { ... }).call();`) |
| **[`additionalCode`](#additionalcode)** | `{String}` | `undefined` | Adds custom code |
- **[`type`](#type)**
- **[`imports`](#imports)**
- **[`wrapper`](#wrapper)**
- **[`additionalCode`](#additionalcode)**
### `type`
Type: `String`
Type:
```ts
type type = string;
```
Default: `module`

@@ -270,3 +285,38 @@

Type: `String|Object|Array<String|Object>`
Type:
```ts
type imports =
| string
| {
syntax:
| "default"
| "named"
| "namespace"
| "side-effects"
| "single"
| "multiple"
| "pure";
moduleName: string;
name: string;
alias: string;
}
| Array<
| string
| {
syntax:
| "default"
| "named"
| "namespace"
| "side-effects"
| "single"
| "multiple"
| "pure";
moduleName: string;
name: string;
alias: string;
}
>;
```
Default: `undefined`

@@ -276,3 +326,3 @@

#### `String`
#### `string`

@@ -383,3 +433,3 @@ Allows to use a string to describe an export.

#### `Object`
#### `object`

@@ -440,3 +490,3 @@ Allows to use an object to describe an import.

#### `Array`
#### `array`

@@ -501,3 +551,14 @@ Allow to specify multiple imports.

Type: `Boolean|String|Object`
Type:
```ts
type wrapper =
| boolean
| string
| {
thisArg: string;
args: Record<string, string> | Array<string>;
};
```
Default: `undefined`

@@ -509,3 +570,3 @@

#### `Boolean`
#### `boolean`

@@ -550,3 +611,3 @@ **webpack.config.js**

#### `String`
#### `string`

@@ -591,3 +652,3 @@ **webpack.config.js**

#### `Object`
#### `object`

@@ -635,3 +696,3 @@ **webpack.config.js**

#### `Object` with different parameter names
#### `object` with different parameter names

@@ -684,3 +745,8 @@ **webpack.config.js**

Type: `String`
Type:
```ts
type additionalCode = string;
```
Default: `undefined`

@@ -687,0 +753,0 @@

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