Expand my Community achievements bar.

ES6 support with app builder

Avatar

Level 1

Hi,

Using these instructions ( https://developer.adobe.com/app-builder/docs/getting_started/first_app/ ) , we created hello world app and trying use ES6 library ( https://www.npmjs.com/package/critical ) but import is failing 

 

tried by creating .mjs file as ( index.mjs ) 

import {generate} from 'critical'

export default function (params) {
return {
statusCode: 200,
headers: {
'Content-Type': 'application/json'
},
body: {
LOG_LEVEL: params.LOG_LEVEL,
message: 'this is a test message'
}
}
}

Really blocked with next steps.
Thanks in advance.
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies