mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
build: configure browserslist config (#2054)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
module.exports = ['defaults', 'not IE 11'];
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "@cloudbeaver/browserslist-config",
|
||||
"sideEffects": false,
|
||||
"version": "0.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"main": "index.js"
|
||||
}
|
||||
@@ -34,24 +34,24 @@ module.exports = api => {
|
||||
setSpreadProperties: true,
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: testMode ? undefined : false,
|
||||
targets: {
|
||||
node: 'current',
|
||||
browsers: [
|
||||
'defaults',
|
||||
'not IE 11',
|
||||
// "last 1 chrome version",
|
||||
// "last 1 firefox version",
|
||||
// "last 1 edge version",
|
||||
// "last 1 safari version"
|
||||
],
|
||||
},
|
||||
exclude: ['transform-async-to-generator', 'transform-regenerator'],
|
||||
},
|
||||
],
|
||||
// [
|
||||
// '@babel/preset-env',
|
||||
// {
|
||||
// modules: testMode ? undefined : false,
|
||||
// targets: {
|
||||
// node: 'current',
|
||||
// browsers: [
|
||||
// 'defaults',
|
||||
// 'not IE 11',
|
||||
// // "last 1 chrome version",
|
||||
// // "last 1 firefox version",
|
||||
// // "last 1 edge version",
|
||||
// // "last 1 safari version"
|
||||
// ],
|
||||
// },
|
||||
// exclude: ['transform-async-to-generator', 'transform-regenerator'],
|
||||
// },
|
||||
// ],
|
||||
// ['@babel/preset-typescript', { isTSX: true, allExtensions: true, onlyRemoveTypeImports: true }],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
|
||||
@@ -18,14 +18,6 @@ module.exports = [
|
||||
'd3',
|
||||
'dagre',
|
||||
'codemirror',
|
||||
'@codemirror/*',
|
||||
'@codemirror/commands',
|
||||
'@codemirror/language',
|
||||
'@codemirror/search',
|
||||
'@codemirror/state',
|
||||
'@codemirror/view',
|
||||
'@codemirror/autocomplete',
|
||||
'@codemirror/lang-*',
|
||||
'@codemirror',
|
||||
'@lezer',
|
||||
'@lezer/*',
|
||||
];
|
||||
];
|
||||
|
||||
@@ -85,7 +85,6 @@ module.exports = (env, argv) => {
|
||||
};
|
||||
|
||||
return {
|
||||
// target: !devMode ? "web" : "browserslist",
|
||||
optimization: {
|
||||
runtimeChunk: 'single',
|
||||
moduleIds: 'deterministic',
|
||||
@@ -104,7 +103,7 @@ module.exports = (env, argv) => {
|
||||
enforceSizeThreshold: 50000,
|
||||
cacheGroups: {
|
||||
locale: {
|
||||
test: /[\\/]locales[\\/].*?\.ts/,
|
||||
test: /[\\/]locales[\\/].*?\.js/,
|
||||
filename: '[name].[contenthash].js',
|
||||
name(module) {
|
||||
return module.rawRequest.substr(2);
|
||||
|
||||
@@ -9,11 +9,14 @@
|
||||
"description": "CloudBeaver Community",
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/index.js",
|
||||
"browserslist": [
|
||||
"extends @cloudbeaver/browserslist-config"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rimraf --glob lib && lerna run gql:gen --stream --parallel && tsc -b",
|
||||
"bundle": "yarn build && core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js",
|
||||
"dev": "yarn build && concurrently -P -k \"yarn tsc -b --watch --preserveWatchOutput\" \"lerna run gql:gen:dev --stream --parallel\" \"core-cli-build serve --mode=development --progress --config=../core-cli/configs/webpack.product.dev.config.js --port=3100 {@}\"",
|
||||
"analyse": "core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js --profile --json > ./lib/stats.json",
|
||||
"analyse": "yarn build && rimraf --glob lib && mkdir lib && core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js --profile --json > ./lib/stats.json",
|
||||
"postanalyse": "core-cli-analyzer ./lib/stats.json",
|
||||
"lint": "eslint ./src/ --ext .ts,.tsx",
|
||||
"lint-fix": "eslint ./src/ --ext .ts,.tsx --fix",
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
"disableReferencedProjectLoad": true,
|
||||
"disableSolutionSearching": true,
|
||||
|
||||
// disable support of helpers
|
||||
"noEmitHelpers": false,
|
||||
"importHelpers": true,
|
||||
|
||||
"types": ["reflect-metadata", "node", "jest", "@cloudbeaver/core-cli/global.d.ts"],
|
||||
"plugins": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user