You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Reacted by Sibelius Seraphini, YoniGit1, Dominik Dassow, frankda, Spence, Hazhir and Сергей Быстров
Activity
arthanzel commentedon Jan 9, 2021
Could you post an example of a project where it's failing? Admittedly, it's an ancient loader but doing
npm install evaluatexshould be downloading only transpiled code, not the sources. Requiringbabel-registeris a development aid and it shouldn't normally be called.sibelius commentedon Jan 11, 2021
I've made a tiny example here https://github.com/sibelius/evaluatex-webpack
yarn startworks wellyarn prodwill breakarthanzel commentedon Jan 11, 2021
I suspect that Webpack is optimistically trying to resolve
babel-loaderby statically analyzing the loader inevaluatex/index.js. With this change, it appears to compile: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:mainpoint todist/evaluatex.jsunconditionally, 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.