-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround with create-react-app #930
Comments
The current working solution with create-react-app without ejecting it is: Add the following line in
and instead of an import, use alasql as follows:
The problems being:
|
I will close this issue. Please reopen if this does not help you out. |
@mathiasrw this can be fixed in package.json: set @kdabir the url https://unpkg.com/alasql/dist/alasql.min.js will always reference the latest version (and that's true for any npm module -- unpkg is a great service) |
@reviewher This is awesome. Thank you so much! |
@mathiasrw so @reviewher's suggestion will truly close the issue, which I guess is already done in acf90aa. Waiting for 0.4.2 now :). Thanks for the quick fix. And thanks @reviewher for the suggestion 👍 |
0.4.2 is out now: http://unpkg.com/alasql/dist/alasql.min.js |
Just tried out, works like a charm. Thanks again @mathiasrw & @reviewher. |
I can't able to make my header bold. I am using XLSX in my react app. |
Re vue (working solution): https://gist.github.com/kiichi/76583589ed2a92775ef0607f89d42157 |
I too had to opt for this hack in my // Necessary hack due to https://github.com/agershun/alasql/issues/930
// import alasql from "alasql";
import alasql from "../../../node_modules/alasql/dist/alasql.min.js"; I'm hoping v2 will solve these problems. |
It will - But it would be good to solve in the current version too. Maybe as a ES module where you select if its node or browser you import. Inputs welcome to how its done the best way. |
@peterbe Have a look at #767 (comment) |
Pls how can I fix this issue for create-next-app |
@psecuresystem Do you have an ida about how to solve it for create-next-app? |
In case anyone else runs into this on Next.js (e.g. Next.js 14), the AlaSQL readme mentions you can set Lines 435 to 444 in de63f66
e.g. in your const config = {
webpack: function (config) {
Object.assign(config.module, {
noParse: [/alasql/]
});
return config;
},
}; |
Hi,
Please pardon me for my limited frontend tech knowledge. However, when I try to add
alasql
to an app created withcreate-react-app
, it just fails. Since I don't want to eject CRA at this stage, I cannot configure webpack config. I suppose lot of people use CRA these days. So this would be blocker for all of those.Following are the simple steps to reproduce the issue:
Add the following import to
src/App.js
When I run the app with following command
$ npm start
, I see following errorThe app just doesn't work.
The text was updated successfully, but these errors were encountered: