mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
Previoiusly, we didn't correctly handle ESM configurations as the `import` was always downlevelled to `require` by TypeScript. Closes #22547
19 lines
563 B
JavaScript
19 lines
563 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
entry: path.resolve(__dirname, './src/main.js'),
|
|
module: {
|
|
rules: [
|
|
// rxjs 6 requires directory imports which are not support in ES modules.
|
|
// Disabling `fullySpecified` allows Webpack to ignore this but this is
|
|
// not ideal because it currently disables ESM behavior import for all JS files.
|
|
{ test: /\.[m]?js$/, resolve: { fullySpecified: false } },
|
|
],
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, './dist'),
|
|
filename: 'bundle.js',
|
|
},
|
|
};
|