We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0ad978 commit d75acb5Copy full SHA for d75acb5
lib/index.js
@@ -49,18 +49,15 @@ class MicroservicesWebpackPlugin {
49
async tapAsync(compilation, callback) {
50
this.modules = await this.createUrlsToModules(this.modules);
51
52
+ const { libraryTarget } = compilation.runtimeTemplate.outputOptions;
53
+
54
compilation.assets = fromEntries(Object.entries(compilation.assets)
55
.map(([fileName, asset]) => {
- if (!fileName.includes('.js')) {
56
+ if (!fileName.includes('.js') || libraryTarget !== 'amd') {
57
return [fileName, asset];
58
}
59
60
const source = asset.source();
- const supportAmdOnly = 'define(';
-
61
- if (!source.startsWith(supportAmdOnly)) {
62
- return [fileName, asset];
63
- }
64
65
const value = [
66
this.modules
0 commit comments