Coder Social home page Coder Social logo

Comments (6)

vidartf avatar vidartf commented on May 8, 2024 1

Thanks! Works well, also in my full project. Eagerly awaiting 2.1.5 👍

from karma-typescript.

vidartf avatar vidartf commented on May 8, 2024

I saw c4b9571 now, and following the comments were able to load the JSON with the preprocessor. Unfortunately, it seems like the preprocessor adds a field default to the loaded JSON data, which should not be there.

from karma-typescript.

monounity avatar monounity commented on May 8, 2024

I'm removing the stuff I added in c4b9571, it was a bad idea... You'll be able to load the JSON without a special preprocessor, and the extra defaultshould be gone too, the commonjs loader adds a bit of default export magic which JSON content doesn't need, it creates a cyclic dependency. I'm hoping I can commit the fix tomorrow morning!

from karma-typescript.

vidartf avatar vidartf commented on May 8, 2024

Ok. Final request though: It would be nice if it was possible to load JSON data from files whose filename does not have the .json file extension!

from karma-typescript.

vidartf avatar vidartf commented on May 8, 2024

Hmm. Nevermind the last one, as it seems that the normal require function might not be OK with that either.

from karma-typescript.

monounity avatar monounity commented on May 8, 2024

Your test project works now with the latest from master, note that I've removed the JSON preprocessor, requiring JSON works automatically now!

from karma-typescript.

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.