Include jQuery plugin to Angular Universal -


please issue.

in angular2-webpack-starter importing jquery plugins i'm doing this: in webpack.config define jquery variables in provideplugin:

jquery: 'jquery', $: 'jquery',

... , etc.

and in ts component i'm importing plugin, example:

import 'jquery.backstretch' 

and works fine, in console.log shows lib.

can in angular2 universal webpack???

i'm doing same, when starting

dist/server/index.js 

it throws error

referenceerror: jquery not defined @ object.<anonymous> (/users/artem/projects/universal-starter/node_modules/jquery.backstretch/jquery.backstretch.js:1472:3) 


Comments