marko/babel.config.js
Michael Rawlings 02670c8693
feat: import compiler from marko-js/x
Co-authored-by: Michael Rawlings <mirawlings@ebay.com>
Co-authored-by: Dylan Piercey <dpiercey@ebay.com>
Co-authored-by: Andrew Gliga <agliga@ebay.com>
2020-02-24 21:15:05 -08:00

36 lines
678 B
JavaScript

module.exports = api => ({
retainLines: true,
presets: [
[
"@babel/env",
{
loose: true,
targets: {
node: "8"
}
}
]
],
plugins: [
"@babel/transform-runtime",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
],
overrides: [
{
test: "./packages/*/src/**/*",
plugins: api.env("production")
? [
["babel-plugin-minprops", { matchPrefix: "___", context: "marko" }],
"./scripts/babel-plugin-marko-debug"
]
: []
}
],
env: {
test: {
plugins: ["babel-plugin-istanbul"]
}
}
});