Skip to content

Commit 75fddc9

Browse files
alan-agius4josephperrott
authored andcommitted
test(@angular-devkit/build-angular): workaround for rxjs 6 directory imports
rxjs 6 requires directory imports which are not support in ES modules. Disabling `fullySpecified` allows Webpack to ignore cases such as this until the package can be updated to use package exports.
1 parent 7930b50 commit 75fddc9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/angular_devkit/build_webpack/test/angular-app/webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ module.exports = {
2424
],
2525
module: {
2626
rules: [
27+
// rxjs 6 requires directory imports which are not support in ES modules.
28+
// Disabling `fullySpecified` allows Webpack to ignore this but this is
29+
// not ideal because it currently disables ESM behavior import for all JS files.
30+
{ test: /\.[m]?js$/, resolve: { fullySpecified: false } },
2731
{ test: /\.css$/, type: 'asset/source' },
2832
{ test: /\.html$/, type: 'asset/source' },
2933
{ test: /\.ts$/, loader: '@ngtools/webpack' },

packages/angular_devkit/build_webpack/test/basic-app/webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ const path = require('path');
33
module.exports = {
44
mode: 'development',
55
entry: path.resolve(__dirname, './src/main.js'),
6+
module: {
7+
rules: [
8+
// rxjs 6 requires directory imports which are not support in ES modules.
9+
// Disabling `fullySpecified` allows Webpack to ignore this but this is
10+
// not ideal because it currently disables ESM behavior import for all JS files.
11+
{ test: /\.[m]?js$/, resolve: { fullySpecified: false } },
12+
],
13+
},
614
output: {
715
path: path.resolve(__dirname, './dist'),
816
filename: 'bundle.js',

0 commit comments

Comments
 (0)