aurelia / webpack-plugin

A plugin for webpack that enables bundling Aurelia applications.
MIT License
90 stars 36 forks source link

No PLATFORM.Loader is defined #149

Closed jauniuse closed 6 years ago

jauniuse commented 6 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior:

aurelia-bootstrapper logs error in console: No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally available to load your app. when using aurelia-webpack plugin. Application works fine, it's just this error. This issue was brought up in https://github.com/aurelia/bootstrapper-webpack/issues/16

jods4 commented 6 years ago

To clarify: are you using aurelia-bootstrapper-webpack (you shouldn't)?

We'll need more information (e.g. a repro) to do anything with this issue. Basic scenario works for most people.

jauniuse commented 6 years ago

@jods4, no, I'm using aurelia-bootstrapper. I will get back with some example repo.

jauniuse commented 6 years ago

It turns out a mistake in my webpack.config.js was causing error.

Before:

 entry: {
    main: ['aurelia-bootstrapper', ...],
    vendors: ['aurelia-bootstrapper', ...]
 }

Removing aurelia-bootstrapper from vendors fixed the issue