Skip to content

Commit

Permalink
fix(web): resolve issue where different core-js versions exist in the…
Browse files Browse the repository at this point in the history
… same workspace

Closes #2086
  • Loading branch information
jaysoo authored and vsavkin committed Nov 28, 2019
1 parent 539c608 commit 7a434d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 1 addition & 6 deletions e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,7 @@ export function copyMissingPackages(): void {
'@testing-library',

// For testing webpack config with babel-loader
'@babel/core',
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-typescript',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-decorators',
'@babel',
'babel-loader',
'babel-plugin-macros',
'eslint-plugin-import',
Expand Down
5 changes: 4 additions & 1 deletion packages/web/src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as webpack from 'webpack';
import { Configuration, ProgressPlugin, Stats } from 'webpack';
import { dirname } from 'path';
import { dirname, resolve } from 'path';
import { LicenseWebpackPlugin } from 'license-webpack-plugin';
import * as CopyWebpackPlugin from 'copy-webpack-plugin';
import * as TerserWebpackPlugin from 'terser-webpack-plugin';
Expand Down Expand Up @@ -63,6 +63,9 @@ export function getBaseWebpackPartial(
mainFields
})
],
// Search closest node_modules first, and then fallback to to default node module resolution scheme.
// This ensures we are pulling the correct versions of dependencies, such as `core-js`.
modules: [resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
mainFields
},
performance: {
Expand Down

0 comments on commit 7a434d4

Please sign in to comment.