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

file-loader

Package Overview
Dependencies
Maintainers
7
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-loader - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.1.5"></a>
## [1.1.5](https://github.com/webpack/file-loader/compare/v1.1.4...v1.1.5) (2017-10-05)
### Bug Fixes
* **schema:** allow `name` to be a `{Function}` (`options.name`) ([#216](https://github.com/webpack/file-loader/issues/216)) ([fbfb160](https://github.com/webpack/file-loader/commit/fbfb160))
<a name="1.1.4"></a>

@@ -7,0 +17,0 @@ ## [1.1.4](https://github.com/webpack/file-loader/compare/v1.1.3...v1.1.4) (2017-09-30)

4

dist/options.json
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"name": {},
"regExp": {},

@@ -8,0 +6,0 @@ "context": {

{
"name": "file-loader",
"version": "1.1.4",
"version": "1.1.5",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "file loader module for webpack",

@@ -60,3 +60,3 @@ [![npm][npm]][npm-url]

|:--:|:--:|:-----:|:----------|
|**`name`**|`{String}`|`[hash].[ext]`|Configure a custom filename template for your file|
|**`name`**|`{String\|Function}`|`[hash].[ext]`|Configure a custom filename template for your file|
|**`context`**|`{String}`|`this.options.context`|Configure a custom file context, defaults to `webpack.config.js` [context](https://webpack.js.org/configuration/entry-context/#context)|

@@ -72,2 +72,4 @@ |**`publicPath`**|`{String\|Function}`|[`__webpack_public_path__ `](https://webpack.js.org/api/module-variables/#__webpack_public_path__-webpack-specific-)|Configure a custom `public` path for your files|

#### `{String}`
**webpack.config.js**

@@ -83,2 +85,20 @@ ```js

#### `{Function}`
**webpack.config.js**
```js
{
loader: 'file-loader',
options: {
name (file) {
if (env === 'development') {
return '[path][name].[ext]'
}
return '[hash].[ext]'
}
}
}
```
#### `placeholders`

@@ -129,3 +149,3 @@

name: '[path][name].[ext]',
publicPath: 'assets'
publicPath: 'assets/'
}

@@ -143,3 +163,3 @@ }

name: '[path][name].[ext]',
outputPath: 'images'
outputPath: 'images/'
}

@@ -146,0 +166,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