rollup-plugin-alias
Advanced tools
Comparing version 2.1.0 to 2.2.0
# rollup-plugin-alias changelog | ||
## 2.2.0 | ||
*2019-10-21* | ||
* Support resolving `index.js` files in directories ([#64](https://github.com/rollup/rollup-plugin-alias/pull/64) by @jerriclynsjohn) | ||
## 2.1.0 | ||
*2019-10.18* | ||
* Add support for object syntax ([#61](https://github.com/rollup/rollup-plugin-alias/pull/61)) | ||
*2019-10-18* | ||
* Add support for object syntax ([#61](https://github.com/rollup/rollup-plugin-alias/pull/61) by @Andarist) | ||
## 2.0.1 | ||
*2019-09-27* | ||
* Update dependencies ([#59](https://github.com/rollup/rollup-plugin-alias/pull/59)) | ||
* Make volume letter regexp case independent ([#57](https://github.com/rollup/rollup-plugin-alias/pull/57)) | ||
* Update dependencies ([#59](https://github.com/rollup/rollup-plugin-alias/pull/59) by @lukastaegert) | ||
* Make volume letter regexp case independent ([#57](https://github.com/rollup/rollup-plugin-alias/pull/57) by @MarekLacoAXA) | ||
## 2.0.0 | ||
*2019-08-22* | ||
* Add RegExp support and strict order of entries ([#53](https://github.com/rollup/rollup-plugin-alias/pull/53)) | ||
* Add RegExp support and strict order of entries ([#53](https://github.com/rollup/rollup-plugin-alias/pull/53) by @thiscantbeserious) | ||
@@ -16,0 +20,0 @@ ### Breaking Changes |
@@ -93,3 +93,9 @@ import fs from 'fs'; | ||
} else { | ||
updatedId = filePath + '.js'; | ||
const indexFilePath = posix.resolve(directory, `${updatedId}/index`); | ||
const defaultMatch = resolve.map(ext => `${indexFilePath}${ext}`).find(exists); | ||
if (defaultMatch) { | ||
updatedId = defaultMatch; | ||
} else { | ||
updatedId = filePath + '.js'; | ||
} | ||
} | ||
@@ -96,0 +102,0 @@ } |
@@ -98,3 +98,9 @@ 'use strict'; | ||
} else { | ||
updatedId = filePath + '.js'; | ||
const indexFilePath = path.posix.resolve(directory, `${updatedId}/index`); | ||
const defaultMatch = resolve.map(ext => `${indexFilePath}${ext}`).find(exists); | ||
if (defaultMatch) { | ||
updatedId = defaultMatch; | ||
} else { | ||
updatedId = filePath + '.js'; | ||
} | ||
} | ||
@@ -101,0 +107,0 @@ } |
{ | ||
"name": "rollup-plugin-alias", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Resolves aliases with Rollup", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-alias.js", |
@@ -94,3 +94,9 @@ import fs from 'fs'; | ||
} else { | ||
updatedId = filePath + '.js'; | ||
const indexFilePath = posix.resolve(directory, `${updatedId}/index`); | ||
const defaultMatch = resolve.map(ext => `${indexFilePath}${ext}`).find(exists); | ||
if (defaultMatch) { | ||
updatedId = defaultMatch; | ||
} else { | ||
updatedId = filePath + '.js'; | ||
} | ||
} | ||
@@ -97,0 +103,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16606
296