Sitelet https://github.com/preboot/angular-webpack/issues/343
Skip to content

how to import vendors ? #343

Description

@phil123456

Hi

I tried to move my "lodash" import to the vendor.ts but as expected,

the compilation gave errors

polyfills.js:7530 [at-loader] ./src/app/auth/auth.service.ts:56:25 
TS2686: '_' refers to a UMD global, but the current file is a module. Consider adding an import instead.

polyfills.js:7530 [at-loader] ./src/vendor.ts:14:13 
TS6133: '_' is declared but never used.

what am I missing ?

vendor.ts

// Angular 2
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import '@angular/http';
import '@angular/router';

import 'rxjs';
import '@angularclass/hmr';

// Other vendors for example jQuery, Lodash or Bootstrap
// You can import js, ts, css, sass, ...
import * as _ from 'lodash';

thanks

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions