mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
|
module.exports = function (api) {
|
||
|
api.cache(true);
|
||
|
const presets = [
|
||
|
[
|
||
|
"@babel/preset-env",
|
||
|
{
|
||
|
targets: "> 5%",
|
||
|
useBuiltIns: "usage",
|
||
|
corejs: 3,
|
||
|
loose: true,
|
||
|
spec: false,
|
||
|
modules: "auto",
|
||
|
// debug: true
|
||
|
},
|
||
|
],
|
||
|
];
|
||
|
const plugins = [
|
||
|
"closure-elimination",
|
||
|
// var is faster than let and const!
|
||
|
[
|
||
|
"@babel/plugin-transform-block-scoping",
|
||
|
{
|
||
|
throwIfClosureRequired: false,
|
||
|
},
|
||
|
],
|
||
|
[
|
||
|
"@babel/plugin-transform-classes",
|
||
|
{
|
||
|
loose: true,
|
||
|
},
|
||
|
],
|
||
|
];
|
||
|
return {
|
||
|
presets,
|
||
|
plugins,
|
||
|
highlightCode: true,
|
||
|
sourceType: "module",
|
||
|
sourceMaps: false,
|
||
|
parserOpts: {},
|
||
|
only: ["../src/js"],
|
||
|
generatorOpts: {
|
||
|
retainLines: false,
|
||
|
compact: true,
|
||
|
minified: true,
|
||
|
comments: true,
|
||
|
},
|
||
|
};
|
||
|
};
|