Webpack: Make Resolve.alias optional

The alias property on the Resolve interface was incorrectly declared
as required. This commit makes it optional.

Files changed:
 - webpack/webpack.d.ts: Set Resolve.alias to optional
 - webpack/webpack-tests.ts: Add new test which would have failed
   but now passes

Documentation: https://webpack.github.io/docs/configuration.html#resolve-alias
This commit is contained in:
Akim McMath
2016-03-20 23:07:07 -07:00
parent 6766ed1d0f
commit 75192c91a9
2 changed files with 7 additions and 2 deletions

View File

@@ -247,6 +247,12 @@ configuration = {
devtool: "#inline-source-map"
};
configuration = {
resolve: {
root: __dirname
}
};
loader = {
test: /\.jsx$/,
include: [

View File

@@ -147,7 +147,7 @@ declare module "webpack" {
interface Resolve {
/** Replace modules by other modules or paths. */
alias: { [key: string]: string; };
alias?: { [key: string]: string; };
/**
* The directory (absolute path) that contains your modules.
* May also be an array of directories.
@@ -536,4 +536,3 @@ declare module "webpack" {
//export default webpack;
export = webpack;
}