Skip to content
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

ember-simple-auth 1.4.0 create a strange file when I "ember build -prod" #61

Open
ghost opened this issue Aug 1, 2017 · 5 comments
Open

Comments

@ghost
Copy link

ghost commented Aug 1, 2017

I switched from 1.3.0 to 1.4.0 and now when I ember build -prod I have a new file in:

dist/ember-fetch/fastboot-fetch-a4c28b6b7b24781cc7616fb44c1def25.js:

(function(){define('fetch',['exports'],function(a){var b=FastBoot.require('node-fetch');a['default']=b,a.Headers=b.Headers,a.Request=b.Request,a.Response=b.Response}),define('fetch/ajax',['exports'],function(){throw new Error('You included fetch/ajaxbut it was renamed toember-fetch/ajax')})})();

Why this?

I don't want this file in my prod dist folder.

I'm not using fastboot.

@tchak
Copy link
Collaborator

tchak commented Oct 14, 2017

This file is part of ember-fetch distribution. If you do not use fastboot you can safely remove it from your production deploy. To answer the question why it exists: when one use fastboot it will be required from the node runtime.

I think this is a won't fix. @johnunclesam if you require some help with some issue you having because of the file, please reopen.

@tchak tchak closed this as completed Oct 14, 2017
@xm
Copy link

xm commented Oct 26, 2017

@tchak is there a way for this to only be included for fastboot builds?

@tchak
Copy link
Collaborator

tchak commented Oct 27, 2017

@xm what do you mean by "fastboot build"? There is only one build as of fastboot 1.0

@xm
Copy link

xm commented Oct 27, 2017

In other words: if my app is not using fastboot, how do I avoid this step ever happening? Is there a flag to set, or can a change be made in ember-fetch to detect fastboot?

@tchak
Copy link
Collaborator

tchak commented Oct 27, 2017

After some thought there may be a solution. If ember-fetch could know if ember-fastboot is installed it could decide to include or not the file in the public folder.
I am wondering if the pattern of requiring a fastboot specific implementation is something we expect to become idiomatic and used in lots of addons? If it is the case, maybe it worth resolving? cc @rwjblue @kratiahuja

@tchak tchak reopened this Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants