Skip to content
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

How install and use NG2 with NPM+builder? #419

Open
christianlupus opened this issue Nov 8, 2024 · 0 comments
Open

How install and use NG2 with NPM+builder? #419

christianlupus opened this issue Nov 8, 2024 · 0 comments

Comments

@christianlupus
Copy link

Describe the issue
In the docs it is mentioned, that one can install NG2 by means of a local NPM installation. I can for sure install both jQuery and NG2 as (project) dependencies putting them in some folder like node_modules/nanogallery2 etc.

I want then use a builder/bundler (like Vite, Webpack, Rollup or whatever) to bundle jQuery (as required by NG2), NG2 core and some lines from me (to instantiate the NG2 correctly) in a bundle and ship that as part of the deployment. How can I achieve this?

I tried to du it with a Hugo static page to generate the HTML code (not really related here) but was facing the problem that NG2 claimed in the browser logs that no compatible jQuery was found.

As this involved a build step with NPM involved, I created a dummy page (mainly the boilerplate code) here. There is a short README that explains the 3 steps needed to run everything.

Once, this is sorted out, I suggest to update some of the documentation but nevertheless, first get this sorted out, okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant