mirror of
https://github.com/embarklabs/subspace.git
synced 2025-01-09 05:53:18 +00:00
4232fc3231
* fix: use webpack to transpile js code and removed webpack * fix: update tests * fix: node version * fix: code review
80 lines
1.7 KiB
JavaScript
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
|
|
};
|
|
};
|