-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addon breaks without mirage installed #929
Comments
Hi @seanCodes thanks for reporting. Could you please provide some additional details:
For reference demo app in this repository ("website" package) does not have mirage installed and it is building ok. It's hosted here: https://ember-file-upload.pages.dev/ |
Oh interesting about the demo app… I can try setting up a reduced test case app to try and reproduce. Here’s the requested info:
I’m also on |
Hey @gilest, I’m not sure what the |
Found time to investigate today. This is an open issue with the handling of optional peer dependencies by Until that issue is fixed there are a few options for a workaround:
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const webpack = require('webpack');
module.exports = function (defaults) {
const app = new EmberApp(defaults, {
autoImport: {
webpack: {
plugins: new webpack.IgnorePlugin({
// workaround for https://github.com/embroider-build/ember-auto-import/issues/578
resourceRegExp: /miragejs/,
}),
},
},
// Add options here
}); Thanks again for reporting, and providing a reproduction. I'll leave this issue open for visibility until the |
Both embroider-build/ember-auto-import/issues/578 and embroider-build/embroider/pull/1468 have been closed Please check ensure you're using |
Without
miragejs
installed as a dependency I get the errorThis seems similar to #926.
miragejs
is listed as an optional peer dependency but the compiled artifact output requires it.Perhaps moving mirage-related logic to a separate addon as suggested in #641 would be the best fix? Until then the docs should probably include miragejs as one of the required dependencies.
The text was updated successfully, but these errors were encountered: