Giter Club home page Giter Club logo

Comments (5)

vlascik avatar vlascik commented on May 29, 2024 1

Oh, now I see what you mean, after I added useSessionSetupMethod to ember-cli-build.js, it worked fine.

Perhaps this should be mentioned in the readme, not just in migration guide? Didn't know about this step until you mentioned it.

Feel free to close this issue. Thanks.

from ember-simple-auth.

BobrImperator avatar BobrImperator commented on May 29, 2024

Hello @vlascik

ESA has implemented a way to strip away the file already, but it's not the default just yet as we're still supporting mixins until v5.

Please take a look at these guides https://github.com/simplabs/ember-simple-auth/blob/master/guides/upgrade-to-v4.md
Implementing this should fix your embroider issue and typescript.
Let me know if it happens to fix the issue for you.

I'm also currently working on embroider support in ESA and I'd expect it to be included yet in v4 or already in v5.

from ember-simple-auth.

vlascik avatar vlascik commented on May 29, 2024

Hi @BobrImperator, yes I've seen it, I'm calling this.session.setup() in my application route already - the problem is, that in this specific scenario (pods + embroider), ESA's empty route file overrides my app's route file in the build output, and breaks the app.

Adding files to addon's app folder is probably not a good idea unless it's just a typical helper/service reexport, the ESA's empty route file probably doesn't belong there - the need for it either should only be mentioned in docs (which it already is), or the file should only be created in host app's directory via post-ember install generate command, because as it is, the only way to fix this issue is by deleting node_modules/ember-simple-auth/app/routes/application.js file after every npm/yarn install.

However, this might be a breaking change and require a new major.

Not sure if I made the problem clear enough.

from ember-simple-auth.

BobrImperator avatar BobrImperator commented on May 29, 2024

@vlascik ESA will definitely remove the file as it was also reported that it caused problems with typescript.
The file was added in the ancient times for initializer works reliably when ESA was mounting a beforeModel hook on it.
This will be removed in V5 as I mentioned.

What you said is clear to me, but we can't remove this without a major release as you've mentioned.

I also asked if you're using the session method, because this file should already be stripped away during build and so it shouldn't cause anymore trouble - it fixed build issues for projects that use typescript and it's weird that it still breaks for embroider.

Could you make sure that you're configuring ESA inside your ember-cli-build.js so it removes the file?
https://github.com/simplabs/ember-simple-auth/blob/master/packages/test-app/ember-cli-build.js

from ember-simple-auth.

BobrImperator avatar BobrImperator commented on May 29, 2024

Thanks for checking this out for me 🙏

from ember-simple-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.