-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Suggestion: Improve Alcaeus Web DX by documenting eliminating/reducing Node.js dependencies? #288
Comments
Hello @lambdakris. Thank you for sharing your issues and workarounds. Starting with easy, I could totally add As for the others, admittedly, I've been kind of stuck with webpack 4. It's really nice of you to share your experience. As you point out, all those issues are caused by native packages being used by alcaeus' dependencies. Some may be possible to fix at the source, but if and when is uncertain at best. For example, Hence, I think I would propose to create a page in the documentation which would describe steps needed to work with webpack 5 as you outlined above. |
Thanks @tpluscode , I was kinda thinking along the same lines. I appreciate you adding With regards to adding to the docs, could you provide or point me to some brief directions of how to work with the docs? Can we just make additions/revisions to the docs/latest folder or is there a different workflow that you follow? |
Yes, I would simply add the necessary new pages to The other dir next to |
Edit: Below is in addition to requiring Just to add to this for anyone else coming here to get this building under Webpack 5. The patch on Anyway, the remaining bit of the puzzle for me was modifying the project's module.exports = {
// ...
resolve: {
// modules = [path.resolve(__dirname, 'node_modules'), 'node_modules'],
alias: {
'@rdf-esm/to-ntriples': path.resolve(__dirname, 'node_modules/@rdfjs/to-ntriples/index.js'),
},
},
fallback: {
'rdf-dataset-ext/addAll': path.resolve(__dirname, 'node_modules/rdf-dataset-ext/addAll.js'),
'rdf-dataset-ext/deleteMatch': path.resolve(__dirname, 'node_modules/rdf-dataset-ext/deleteMatch.js'),
'rdf-dataset-ext/fromStream': path.resolve(__dirname, 'node_modules/rdf-dataset-ext/fromStream.js'),
},
}; YMMV. |
Hi @GwendolenLynch. I'm surprised with the hoops you had to jump. We have been using alcaeus in a vue3 app that builds with webpack 5. Other the node native stream and buffer, the config is pretty much the defaults. I'm especially surprised you had to alias and And I do not know the |
OK, under the context of "this is how I understood it" …
tl;dr Webpack's module resolution referenced the … at least that is how I understood things 🤷♀️ |
While trying to use Alcaeus with Angular (which uses webpack for tooling under the hood) following the Alcaeus getting started instructions, I ran into a couple of issues when trying to run the application through the webpack based tooling.
Repro steps
Here is what I tried:
Download, unzip, and open our example Angular App: alcaeus-app.zip (based on the default Angular CLI template)
Install Alcaeus
Problems found
Problem 1 - resolving 'stream'
* Same solution as Problem 2 & 3
node-polyfill-webpack-plugin
packagenode-polyfill-webpack-plugin
in the custom-webpack.config.ts fileProblem 2 - resolving 'url'
* Same solution as for Problem 1 & 3
node-polyfill-webpack-plugin
packagenode-polyfill-webpack-plugin
in the custom-webpack.config.ts fileProblem 3 - resolving 'util'
* Same solution as for Problem 1 & 2
node-polyfill-webpack-plugin
packagenode-polyfill-webpack-plugin
in the custom-webpack.config.ts fileProblem 4 - finding declaration file for 'clownface'
@types/clownface
packageSummary
While we understand that this is not in any way a bug with Alcaeus per se, we would like to see if there is anything that can be done to improve the getting started DX when working with typescript and webpack based tooling like that which Angular uses. We would like to understand whether this means adding details to the documentation or making changes to how Alcaeus itself is packaged or potentially to how certain dependencies of Alcaeus are packaged, etc.. Please let us know if we can provide anymore information or collaboration on this and thanks!
The text was updated successfully, but these errors were encountered: