Giter VIP home page Giter VIP logo

Comments (8)

buschtoens avatar buschtoens commented on September 26, 2024 2

Yes, by submitting this line as a PR to ember-useragent:

importTransforms: require('ember-cli-cjs-transform').importTransforms

We could fix the crash for host apps that don't have ember-cli-cjs-transform installed.

However, that would cause this (apparently harmless) warning:

WARNING: Addon "ember-cli-cjs-transform" is defining a transform name: cjs that is already being defined. Using transform from addon: "ember-cli-cjs-transform".

The alternative is to

  • instruct users of ember-useragent to install ember-cli-cjs-transform
  • automatically install ember-cli-cjs-transform during the installation of ember-useragent

tbh I'm just eagerly awaiting embroider-build/ember-auto-import#119 so that we can use it instead of the CJS transform.

from ember-useragent.

richard-viney avatar richard-viney commented on September 26, 2024

What platform are you on?

from ember-useragent.

buschtoens avatar buschtoens commented on September 26, 2024

This is probably a case of: rwjblue/ember-cli-cjs-transform#22

The solution above isn't ideal, since it probably generates these warnings in host apps that already have ember-cli-cjs-transform themselves as a dependency, but it appears to be a valid fix.

from ember-useragent.

lpaulger avatar lpaulger commented on September 26, 2024

@buschtoens is there anything I can do to bypass this warning? the reference to rwjblue/ember-cli-cjs-transform#22 seems to reference a chance required to this addon, or are you suggesting a PR request?

from ember-useragent.

willviles avatar willviles commented on September 26, 2024
  • automatically install ember-cli-cjs-transform during the installation of ember-useragent

I could implement this as a stop gap until embroider-build/ember-auto-import#119 drops?

from ember-useragent.

lpaulger avatar lpaulger commented on September 26, 2024

@willviles you closed this ticket without providing a clear solution. But I an inferring from the linked ticket #27 that is still open that the "approved" solution is to just install ember-cli-cjs-transform as a project dependency, is this correct?

Will we still see it auto installed as an ember-useragent dependency in the future so we don't have to maintain yet another package in our projects?

from ember-useragent.

willviles avatar willviles commented on September 26, 2024

@lpaulger Correct. Ember UserAgent currently depends upon ember-cli-cjs-transform being installed in your project. I'm hoping there's a happy path forward with ember-auto-import very soon. I'll look into it ASAP, but in the meantime PRs are welcomed!

from ember-useragent.

willviles avatar willviles commented on September 26, 2024

I've created a branch for implementing ember-auto-import. Try it out:

npm i -D git://github.com/willviles/ember-useragent.git#ember-auto-import

from ember-useragent.

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.