0

I am now using webpack with angular and typescript structure. I have a problem about emebed jquery and jquery.flipster in the project.

This is my folder structure enter image description here

And this is my webpack.config.js enter image description here

how to embed this jquery.flipster in the html and config?

i was trying to include jquery.flipster for animation. https://www.npmjs.com/package/jquery.flipster

After npm install jquery.flipster, i cannot find jquery.flipster in "wwwroot" folder, so that i cannot embed jquery.flipster.

Please advice.

nullmicgo
  • 407
  • 4
  • 19
  • If you installed it using `npm`, it'll be in your `node_modules` folder. – fubar Jan 08 '18 at 01:37
  • @fubar but how to embed those what's the path? – nullmicgo Jan 08 '18 at 03:04
  • Unless you can post the project directory structure, no-one is going to be able to tell you that. Find the `node_modules` directory, and write a relative path from your HTML view to that directory. – fubar Jan 08 '18 at 03:19
  • @fubar updated with screen capture. thanks – nullmicgo Jan 08 '18 at 03:44
  • Your `node_modules` directory is typically at the same level as your `package.json`. With that being the case for you (I cannot see it in your screenshot), the directory is outside of your webroot, and therefore (assuming correct server configuration), inaccessible to the web. I would therefore recommend that you include and bundle the jQuery plugin into your `webpack` config. There are loads of answers on Stackoverflow already that show how to do this. E.g. https://stackoverflow.com/questions/28969861/managing-jquery-plugin-dependency-in-webpack – fubar Jan 08 '18 at 05:13

0 Answers0