mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 13:17:50 +08:00
3392ec5704
* Dependency workflow add dependency correction value * Download workflow instance map width adjustment and change "desc" field to "description" * The third-party library that builds the dependency is recommended to be placed in 'devDependencies' * Tree chart and Gantt chart style modification * The workflow instance can be deleted only when its status is success, failure, stop and pause. * change desc to description * Maximum width of tooltip is set to 500px, note the copyright number of login page * Delete copyright number * No tenant in the list of selected tenants the default is default, and the status not shown in the repair page * repair * Repair security center module prompt * Remove blank character during verification * Remove blank character during verification * Non admin users cannot create users, tenants, alarm groups, queues and worker groups * Remove CI windows detection * The value of loadaverage should be two decimal places * Add license * delete docs * update package.json * delete LICENSE * Display icon when there is no data in process definition * Worker group add IP format verification * Modify MySQL page of monitoring center * DB page rename and background color modification * IO build replace with source code * Replace ans charts with source code * delete component-compiler-utils * delete progress-webpack-plugin
133 lines
4.0 KiB
Java
133 lines
4.0 KiB
Java
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
* (the "License"); you may not use this file except in compliance with
|
|
* the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* 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.
|
|
*/
|
|
const path = require('path')
|
|
const webpack = require('webpack')
|
|
const merge = require('webpack-merge')
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
const { baseConfig } = require('./config')
|
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
|
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
|
|
|
|
const resolve = dir =>
|
|
path.resolve(__dirname, '..', dir)
|
|
|
|
const config = merge.smart(baseConfig, {
|
|
devtool: 'source-map',
|
|
output: {
|
|
filename: 'js/[name].[chunkhash:7].js'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.vue$/,
|
|
loader: 'vue-loader',
|
|
options: {
|
|
hotReload: false // 开启热重载
|
|
}
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
loader: ExtractTextPlugin.extract({
|
|
use: [
|
|
'css-loader',
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
plugins: (loader) => [
|
|
require('autoprefixer')({
|
|
'browsers': [ '> 1%', 'last 3 versions', 'ie >= 9' ]
|
|
}),
|
|
require('cssnano')
|
|
]
|
|
}
|
|
}
|
|
],
|
|
fallback: ['vue-style-loader']
|
|
})
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
loader: ExtractTextPlugin.extract({
|
|
use: [
|
|
'css-loader',
|
|
'sass-loader',
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
plugins: (loader) => [
|
|
require('autoprefixer')({
|
|
'browsers': [ '> 1%', 'last 3 versions', 'ie >= 9' ]
|
|
}),
|
|
require('cssnano')
|
|
]
|
|
}
|
|
}
|
|
],
|
|
fallback: ['vue-style-loader']
|
|
})
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new ExtractTextPlugin({ filename: 'css/[name].[contenthash:7].css', allChunks: true }),
|
|
new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].[hash:7].js' }),
|
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
|
new OptimizeCssAssetsPlugin({
|
|
assetNameRegExp: /\.css$/g,
|
|
cssProcessor: require('cssnano'),
|
|
cssProcessorOptions: { discardComments: { removeAll: true } },
|
|
canPrint: true
|
|
}),
|
|
new UglifyJSPlugin({
|
|
parallel: true,
|
|
sourceMap: true,
|
|
uglifyOptions: {
|
|
compress: {
|
|
warnings: false,
|
|
drop_debugger: true,
|
|
drop_console: true,
|
|
pure_funcs: ['console.log']//移除console
|
|
},
|
|
comments: function (n, c) {
|
|
/*! IMPORTANT: Please preserve 3rd-party library license info, inspired from @allex/amd-build-worker/config/jsplumb.js */
|
|
var text = c.value, type = c.type
|
|
if (type === 'comment2') {
|
|
return /^!|@preserve|@license|@cc_on|MIT/i.test(text)
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
new CopyWebpackPlugin([
|
|
{
|
|
from: resolve('src/combo'),
|
|
to: resolve('dist/combo')
|
|
},
|
|
{
|
|
from: resolve('src/lib'),
|
|
to: resolve('dist/lib')
|
|
},
|
|
{
|
|
from: resolve('src/images'),
|
|
to: resolve('dist/images')
|
|
},
|
|
]),
|
|
]
|
|
})
|
|
|
|
module.exports = config
|