Closed MaximBalaganskiy closed 3 years ago
Can you help with a repro? My main entry looks like this
import { Aurelia, PLATFORM } from 'aurelia-framework';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
const appInsights = new ApplicationInsights({ config: {
instrumentationKey: 'YOUR_INSTRUMENTATION_KEY_GOES_HERE'
/* ...Other Configuration Options... */
} });
appInsights.loadAppInsights();
appInsights.trackPageView(); // Manually call trackPageView to establish the current user/session/pageview
export async function configure(aurelia: Aurelia) {
aurelia.use
.basicConfiguration();
await aurelia.start();
await aurelia.setRoot(PLATFORM.moduleName('app'));
}
and webpack builds just fine.
The issue manifests when webpack serve
I had to explicitly set webpack target to 'web'.
webpack.config.js
module.exports = {
....
target: 'web',
....
}
This does not help. The issue is with certain packages only and in a dev server
On Mon, 14 Jun 2021 at 7:31 pm, elitastic @.***> wrote:
I had to explicitly set webpack target to 'web'.
webpack.config.js
module.exports = { .... target: 'web', .... }
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aurelia/webpack-plugin/issues/174#issuecomment-860542288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4KNPHYXFK6QNFFLVYY6PTTSXEAZANCNFSM46NV7N5A .
I'm submitting a bug report
Current behavior: Importing and using
@microsoft/applicationinsights-web
causes a webpack errorLooks like the plugin resolves
node_modules/base
instead of local@microsoft/applicationinsights-web/Interfaces/Contracts/Generated/Base
Expected/desired behavior: