mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-08 08:02:28 +03:00
adapt build process
This commit is contained in:
+27
-13
@@ -1,14 +1,28 @@
|
||||
module.exports = {
|
||||
plugins: ['@babel/plugin-transform-modules-commonjs'],
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
module.exports = function (api) {
|
||||
api.cache.using(() => process.env.NODE_ENV);
|
||||
|
||||
if (api.env('build')) {
|
||||
return {
|
||||
plugins: ['@babel/plugin-transform-runtime', '@babel/plugin-proposal-class-properties'],
|
||||
};
|
||||
}
|
||||
|
||||
if (api.env('test')) {
|
||||
return {
|
||||
plugins: ['@babel/plugin-transform-modules-commonjs'],
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: 'current',
|
||||
},
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user