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
Current behavior:
You can create a new cli project and choose typescript and webpack defaults.
Install aws-amplify, yarn add aws-amplify
In main.ts, import Amplify from 'aws-amplify'.
And call Amplify.configure({...}).
Running au run fails with json errors,
ERROR in ./node_modules/aws-sdk/lib/region_config_data.json
Module parse failed: Unexpected token m in JSON at position 0
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token m in JSON at position 0
at JSON.parse (<anonymous>)
at JsonParser.parse (node_modules/webpack/lib/JsonParser.js:15:21)
What is the expected behavior?
Following the above steps should compile the app correctly.
What is the motivation / use case for changing the behavior?
aws-amplify should work with aurelia cli.
So I removed the json loader line from webpack.config.js, the app compiled and I could use the amplify library. Webpack docs also say that json-loader isn't required for webpack 2 and above. If this is the correct fix, I can send a PR. Otherwise, pls suggest what I might be missing. Thanks.
The text was updated successfully, but these errors were encountered:
Would you like to provide a pull request for it @lovetostrike to remove json loader from generated webpack.config files for cli?
I can point you in right direction if you need.
I'm submitting a bug report
0.33.1
Please tell us about your environment:
Operating System:
Ubuntu 16.04
Node Version:
8.10.0
3.10.4
Browser:
all
Language:
TypeScript 2.7.2
Loader/bundler:
Webpack
Current behavior:
You can create a new cli project and choose typescript and webpack defaults.
Install aws-amplify,
yarn add aws-amplify
In
main.ts
,import Amplify from 'aws-amplify'
.And call
Amplify.configure({...})
.Running
au run
fails with json errors,Following the above steps should compile the app correctly.
aws-amplify should work with aurelia cli.
So I removed the json loader line from
webpack.config.js
, the app compiled and I could use the amplify library. Webpack docs also say that json-loader isn't required for webpack 2 and above. If this is the correct fix, I can send a PR. Otherwise, pls suggest what I might be missing. Thanks.The text was updated successfully, but these errors were encountered: