subspace/babel.config.js
Richard Ramos 4232fc3231
fix: change output from webpack to babel (#64)
* fix: use webpack to transpile js code and removed webpack
* fix: update tests
* fix: node version
* fix: code review
2020-02-03 19:51:19 -04:00

80 lines
1.7 KiB
JavaScript

module.exports = api => {
api.cache(true);
return {
env: {
development: {
presets: [
[
"@babel/preset-env",
{
corejs: 3,
shippedProposals: true,
targets: { node: "current" },
useBuiltIns: "usage"
}
]
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
corejs: 3
}
],
"@babel/plugin-proposal-class-properties"
]
},
browser: {
presets: [
[
"@babel/preset-env",
{
corejs: 3,
modules: false,
shippedProposals: true,
targets: { browsers: "defaults" },
useBuiltIns: "usage"
}
]
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
corejs: 3,
useESModules: true
}
],
"@babel/plugin-proposal-class-properties"
]
},
module: {
presets: [
[
"@babel/preset-env",
{
corejs: 3,
modules: false,
shippedProposals: true,
targets: { node: "current" },
useBuiltIns: "usage"
}
]
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
corejs: 3,
useESModules: true
}
],
"@babel/plugin-proposal-class-properties"
]
}
},
sourceMaps: true
};
};