Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

The zone.js.d.ts file does not work with webpack #384

Closed
flyOstrich opened this issue Jul 25, 2016 · 4 comments
Closed

The zone.js.d.ts file does not work with webpack #384

flyOstrich opened this issue Jul 25, 2016 · 4 comments

Comments

@flyOstrich
Copy link

flyOstrich commented Jul 25, 2016

I tried using zone.js in webpack , see my codes here:
import "reflect-metadata";
import "zone.js";
import { Component } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';

@Component({
selector: 'my-app',
template: '\<h1\>for test\</h1\>'
})
class AppComponent { }

bootstrap(AppComponent);

the typescript compiler throw error:

error TS2656: Exported external package typings file '/Users/pjl/ng2-webpack-seed/node_modules/zone.js/dist/zone.js.
d.ts' is not a module. Please contact the package author to update the package definition.

@AEPKILL
Copy link

AEPKILL commented Aug 5, 2016

i have the problem too.

@gustavohenke
Copy link

The problem is not with Webpack. I have this problem while using Browserify, too.

I think this problem is the same as #297 and #365, and I still don't understand how it should work!

@GabrielDelepine
Copy link

Check @IgorMinar's answer at #365.

You have to load zone.js from the first script tag of you index.html file. Do not import it like the way describe above.

@GiuseppePiscopo
Copy link

It looks like this issue could be closed, by now

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

No branches or pull requests

5 participants