Skip to content

Instantly share code, notes, and snippets.

@pierreinglebert
Last active June 27, 2019 08:17
Show Gist options
  • Save pierreinglebert/0db4fdf08e93b775be12120575f0b3f2 to your computer and use it in GitHub Desktop.
Save pierreinglebert/0db4fdf08e93b775be12120575f0b3f2 to your computer and use it in GitHub Desktop.
postmark + babel import
module.exports = {
ignore: [
"/node_modules/**/*"
],
sourceMaps: true,
presets: [
[
"@babel/preset-env",
{
"targets": {
"node": "12.4"
},
}
],
],
plugins: []
}

Steps to reproduce

npm i
npx babel-node index.js
import postmark from 'postmark';
console.log(typeof postmark);
console.log(typeof require('postmark'));
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"@babel/core": "^7.4.5",
"@babel/node": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"postmark": "^2.2.7"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment