mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
* fix: improve browser support for website * fix(compiler): failing test due to babel config
35 lines
635 B
JavaScript
35 lines
635 B
JavaScript
module.exports = api => ({
|
|
retainLines: true,
|
|
presets: [
|
|
[
|
|
"@babel/env",
|
|
{
|
|
loose: true,
|
|
targets: {
|
|
node: "8"
|
|
}
|
|
}
|
|
]
|
|
],
|
|
plugins: [
|
|
"@babel/transform-runtime",
|
|
"@babel/plugin-proposal-object-rest-spread"
|
|
],
|
|
overrides: [
|
|
{
|
|
test: "./packages/marko/src/**/*",
|
|
plugins: api.env("production")
|
|
? [
|
|
["babel-plugin-minprops", { matchPrefix: "___", context: "marko" }],
|
|
"./scripts/babel-plugin-marko-debug"
|
|
]
|
|
: []
|
|
}
|
|
],
|
|
env: {
|
|
test: {
|
|
plugins: ["babel-plugin-istanbul"]
|
|
}
|
|
}
|
|
});
|