You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this should be "main": "es5/index.js". Currently es2015 module is used by default if you import @ionic/storage, which breaks non-module-aware tools like browserify. I use browserify for karma tests, and this is breaking it. Even babelify doesn't work because @ionic/storage/es2015/index.js is in node_modules/ and babelify won't touch it unless I set global: true,, which produces a lot of unrelated errors.
This is the error I get when I run karma with browserify:
> karma start --no-auto-watch --single-run
24 10 2016 09:46:50.363:ERROR [framework.browserify]: bundle error
24 10 2016 09:46:50.366:ERROR [framework.browserify]:
redacted/ionic-app/node_modules/@ionic/storage/es2015/index.js:1
import { Storage } from './storage';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
package.json
has the following:I think this should be
"main": "es5/index.js"
. Currently es2015 module is used by default if you import@ionic/storage
, which breaks non-module-aware tools like browserify. I use browserify for karma tests, and this is breaking it. Even babelify doesn't work because@ionic/storage/es2015/index.js
is innode_modules/
and babelify won't touch it unless I setglobal: true,
, which produces a lot of unrelated errors.This is the error I get when I run karma with browserify:
karma.conf.js
:I tried to import
@ionic/storage/es5
instead of@ionic/storage
, but I hit issue #18 and couldn't proceed.The text was updated successfully, but these errors were encountered: