Giter Club home page Giter Club logo

Comments (3)

irg1008 avatar irg1008 commented on July 24, 2024

Related to #9545

from redwood.

Josh-Walker-GM avatar Josh-Walker-GM commented on July 24, 2024

Hey @irg1008, you can find the code for studio in this repo: https://github.com/redwoodjs/studio.

For the main repo we started using a single function to generate the import string. We had been doing it individually across the code base and had been inconsistent in our approach - which led to bugs like this every now and then. This code might be transferable if you think it is correct to solve this issue:

/**
* Converts a file path to a URL path (file://...)
* Without this, absolute paths can't be imported on Windows
*/
export function makeFilePath(path: string) {
return pathToFileURL(path).href
}

from redwood.

irg1008 avatar irg1008 commented on July 24, 2024

I will take a look when I get the time, in the meantime I have moved to WSL and no issues so far. On the other hand, do you know if the team is discussing about adding support for "shared" code or packages in monorepo? I mean sharing code and being able to import it both in web and api (my use cases are zod schemas)

I am being able to use this schemas when inside "scripts" folder and web, but importing inside api and it won't work without compiling etc

I know of a couple of issues regarding this but they are stale or are 1 or more years old. I could open a new issue but I don't want to start bloating the repo

from redwood.

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.