I have a component with .js extension which I want to add as one of the
entry-points in my Webpack-configured project. Thereafter, I want to use
that by importing it in another file. How do I do it ?
If this is my component file------
component.js
exports.EventDispatcher = require('./EventDispatcher').EventDispatcher;
If this my webpack common configuration file-------
webpack.common.js
where entry: {
'polyfills': './polyfills.ts',
'vendor': './vendor.ts',
'components': './component.js'
}
And now I have another file called main.ts where I want to import this:
import {EventDispatcher } from 'components'; // which gives error
Any suggestions please.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.