shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

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

Closed inzerceubytovani closed 7 years ago

inzerceubytovani commented 8 years ago

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 commented 7 years ago

This might be related: https://github.com/shlomiassaf/angular2-modal/issues/241

inzerceubytovani commented 7 years ago

I inspirated with https://github.com/shlomiassaf/angular2-modal/issues/220#issuecomment-254313943 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 commented 7 years ago

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