Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' #236

Closed
inzerceubytovani opened this issue Oct 20, 2016 · 3 comments

Comments

@inzerceubytovani
Copy link

When I try generate bundle.js with gulp - browserify, version 2.1.0 and 2.0.0-beta.14 show this errors:

/node_modules/angular2-modal/plugins/bootstrap/index.js:7
export { BSModalContext, BSModalContextBuilder } from './modal-context';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

In version 2.0.0-beta.13 it's everythings allright but I want tu work with angular 2.1.0 and that's not supported in this version.

@TomaszScisloGS
Copy link

This might be related: #241

@inzerceubytovani
Copy link
Author

I inspirated with #220 (comment) and tried this silimar solution in gulp:

.transform("babelify", {presets: ["es2015"], only: /\/node_modules\/angular2-modal\//}) from https://github.com/babel/babelify

But It does not help :(

@shlomiassaf
Copy link
Owner

Consolidated in #244, please come help and replay there.

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

No branches or pull requests

3 participants