Skip to content

Commit

Permalink
feat(@angular-devkit/build-angular): provide webpack support for reso…
Browse files Browse the repository at this point in the history
…lving via Yarn PnP
  • Loading branch information
clydin authored and mgechev committed Apr 8, 2020
1 parent c8d5c3f commit 44b3cc7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"minimatch": "3.0.4",
"parse5": "4.0.0",
"open": "7.0.3",
"pnp-webpack-plugin": "1.6.4",
"postcss": "7.0.27",
"postcss-import": "12.0.1",
"postcss-loader": "3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { getEsVersionForFileName, getOutputHashFormat, normalizeExtraEntryPoints
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const PnpWebpackPlugin = require('pnp-webpack-plugin');

// tslint:disable-next-line:no-big-function
export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
Expand Down Expand Up @@ -491,10 +491,12 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
symlinks: !buildOptions.preserveSymlinks,
modules: [wco.tsConfig.options.baseUrl || projectRoot, 'node_modules'],
alias,
plugins: [PnpWebpackPlugin],
},
resolveLoader: {
symlinks: !buildOptions.preserveSymlinks,
modules: loaderNodeModules,
plugins: [PnpWebpackPlugin.moduleLoader(module)],
},
context: projectRoot,
entry: entryPoints,
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9103,6 +9103,13 @@ pluralize@^7.0.0:
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==

pnp-webpack-plugin@1.6.4:
version "1.6.4"
resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149"
integrity sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==
dependencies:
ts-pnp "^1.1.6"

popper.js@^1.14.1:
version "1.16.1"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
Expand Down Expand Up @@ -11688,6 +11695,11 @@ ts-node@^5.0.0:
source-map-support "^0.5.3"
yn "^2.0.0"

ts-pnp@^1.1.6:
version "1.2.0"
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==

tslib@1.11.1, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@~1.11.0:
version "1.11.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
Expand Down

0 comments on commit 44b3cc7

Please sign in to comment.