Coder Social home page Coder Social logo

Comments (3)

arthanzel avatar arthanzel commented on August 16, 2024 6

I suspect that Webpack is optimistically trying to resolve babel-loader by statically analyzing the loader in evaluatex/index.js. With this change, it appears to compile:

- import evaluatex from 'evaluatex';
+ import evaluatex from 'evaluatex/dist/evaluatex';

A lot has changed in transpiling/bundling since the original Evaluatex was written and the way it is loaded is not the way to do things anymore. While theoretically I might be able to remove the loader entirely and make package.json:main point to dist/evaluatex.js unconditionally, I don't want to do that until I've written some tests that ensure the library is compiled well for server, browser, and bundlers. I hope that this is an acceptable workaround until then.

I'll keep this issue open for now.

from evaluatex.

arthanzel avatar arthanzel commented on August 16, 2024

Could you post an example of a project where it's failing? Admittedly, it's an ancient loader but doing npm install evaluatex should be downloading only transpiled code, not the sources. Requiring babel-register is a development aid and it shouldn't normally be called.

from evaluatex.

sibelius avatar sibelius commented on August 16, 2024

I've made a tiny example here https://github.com/sibelius/evaluatex-webpack

yarn start works well
yarn prod will break

from evaluatex.

Related Issues (13)

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.