Files
medusa-store/packages/babel-preset-medusa-package/index.js
T
Sebastian RindomandOliver Windall Juhl f1baca3cbd Replaces MongoDB support with PostgreSQL (#151)
- All schemas have been rewritten to a relational model
- All services have been rewritten to accommodate the new data model
- Adds idempotency keys to core endpoints allowing you to retry requests with no additional side effects
- Adds staged jobs to avoid putting jobs in the queue when transactions abort
- Adds atomic transactions to all methods with access to the data layer

Co-authored-by: Oliver Windall Juhl <oliver@mrbltech.com>
2021-01-26 10:26:14 +01:00

30 lines
803 B
JavaScript

const r = require(`./resolver`);
function preset(context, options = {}) {
const { debug = false, nodeVersion = `10.14.0` } = options;
const { NODE_ENV, BABEL_ENV } = process.env;
const nodeConfig = {
corejs: 3,
useBuiltIns: `entry`,
targets: {
node: nodeVersion,
},
};
return {
presets: [r(`@babel/preset-env`)],
plugins: [
r(`babel-plugin-transform-typescript-metadata`),
r(`@babel/plugin-proposal-optional-chaining`),
[r(`@babel/plugin-proposal-decorators`), { legacy: true }],
[r(`@babel/plugin-proposal-class-properties`), { loose: true }],
r(`@babel/plugin-transform-classes`),
r(`@babel/plugin-transform-instanceof`),
r(`@babel/plugin-transform-runtime`),
].filter(Boolean),
};
}
module.exports = preset;