Git Product home page Git Product logo

Comments (13)

velin-deity avatar velin-deity commented on September 26, 2024 2

@soartec-lab You should be able to reproduce here https://github.com/velin-deity/test-mutator

from orval.

melloware avatar melloware commented on September 26, 2024 1

OK I marked help wanted. I don't use mutators in my projects but maybe @soartec-lab can answer.

from orval.

melloware avatar melloware commented on September 26, 2024

I think yours is just a symptom of this: #886

I have a feeling you are using Vite and Vite now assumes ESM incorrectly

from orval.

velin-deity avatar velin-deity commented on September 26, 2024

I am using Vite, indeed. I'm struggling to understand how Vite impacts the work of the Orval CLI tool.

from orval.

melloware avatar melloware commented on September 26, 2024

Yeah its weird its because Vite assumes all your code and libraries are ESM modules and Orval is not...it is a CJS module right now. I don't quite fully understand the Vite bundler and how it works I have to admit.

from orval.

velin-deity avatar velin-deity commented on September 26, 2024

What I meant is that the warning is issued when running orval --config ./configs/orval.config.ts. Nothing Vite-related should be getting executed at this stage, so I don't see how the two relate. Is orval transpiling mutator files? If so, would providing a separate tsconfig help here?

from orval.

melloware avatar melloware commented on September 26, 2024

@velin-deity any help would be appreciated if you want to track this one down.

from orval.

velin-deity avatar velin-deity commented on September 26, 2024

I do want to solve the issue but I still need help understanding how the CLI works. More importantly, what actually happens when a mutator is added?

from orval.

melloware avatar melloware commented on September 26, 2024

oh I just checked I used an Axios Mutator with Vite and I see the same warning import.meta.env. as you I just ignore it.

import Axios, { AxiosError, RawAxiosRequestConfig } from "axios";

export const AXIOS_INSTANCE = Axios.create({ baseURL: import.meta.env.REACT_APP_API_SERVER! });

from orval.

soartec-lab avatar soartec-lab commented on September 26, 2024

Ok, I'll take a look this too.

from orval.

soartec-lab avatar soartec-lab commented on September 26, 2024

@velin-deity

If you don't mind, could you please tell me the minimal files, such as "mutator.ts" and "orval.config.js", that would allow me to reproduce this?

from orval.

deity-jeroen avatar deity-jeroen commented on September 26, 2024

Hi, this thread still has the needs_reproducer tag. Is there anything more we can do aside from @velin-deity's previous comment?

from orval.

soartec-lab avatar soartec-lab commented on September 26, 2024

@deity-jeroen
Thank you. I think it's going to take some time before I can look into this and start taking action.

from orval.

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.