UNPKG

@blueking/lesscode-cli

Version:

Command Tools for Lesscode

93 lines (86 loc) 2.55 kB
/** * Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. * Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://opensource.org/licenses/MIT * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ module.exports = function (api) { api.cache(true); const presets = [ [ '@babel/preset-env', { modules: 'commonjs', targets: { node: 'current' }, debug: false, corejs: 3, useBuiltIns: 'usage' } ] ]; const plugins = [ 'add-module-exports', '@babel/plugin-transform-runtime', '@babel/plugin-transform-object-assign', '@babel/plugin-syntax-dynamic-import', [ '@babel/plugin-proposal-decorators', { legacy: true } ], '@babel/plugin-proposal-function-sent', '@babel/plugin-proposal-export-namespace-from', '@babel/plugin-proposal-numeric-separator', '@babel/plugin-proposal-throw-expressions', '@babel/plugin-transform-async-to-generator', [ 'component', { libraryName: 'element-ui', styleLibraryName: 'theme-chalk' } ] ]; const env = { test: { presets: [ '@babel/preset-env' ], plugins: [ 'add-module-exports', '@babel/plugin-transform-runtime', '@babel/plugin-transform-object-assign', '@babel/plugin-syntax-dynamic-import', [ '@babel/plugin-proposal-decorators', { legacy: true } ], '@babel/plugin-proposal-function-sent', '@babel/plugin-proposal-export-namespace-from', '@babel/plugin-proposal-numeric-separator', '@babel/plugin-proposal-throw-expressions', '@babel/plugin-transform-async-to-generator', '@babel/plugin-syntax-jsx' ] } }; const comments = true; return { env, compact: false, presets, plugins, comments, babelrcRoots: ['./'], exclude: /node_modules/ }; };