chore: client linting #242
This commit is contained in:
parent
259f4f0afe
commit
0ff37bc834
5 changed files with 36 additions and 32 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import * as io from 'socket.io-client/dist/socket.io.js';
|
||||
import { Terminal } from 'xterm';
|
||||
import { FitAddon } from 'xterm-addon-fit';
|
||||
|
|
|
|||
|
|
@ -1,32 +1,31 @@
|
|||
const path = require('path')
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
const path = require('path');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve('__dirname', '../'),
|
||||
entry: {
|
||||
webssh2: './client/src/js/index.js'
|
||||
webssh2: './client/src/js/index.js',
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
'./client/src/client.htm',
|
||||
'./client/src/favicon.ico'
|
||||
]
|
||||
patterns: ['./client/src/client.htm', './client/src/favicon.ico'],
|
||||
}),
|
||||
new MiniCssExtractPlugin()
|
||||
new MiniCssExtractPlugin(),
|
||||
],
|
||||
output: {
|
||||
filename: '[name].bundle.js',
|
||||
path: path.resolve(__dirname, '../client/public')
|
||||
path: path.resolve(__dirname, '../client/public'),
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [MiniCssExtractPlugin.loader, 'css-loader']
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
use: [MiniCssExtractPlugin.loader, 'css-loader'],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
const merge = require('webpack-merge')
|
||||
const common = require('./webpack.common.js')
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
const merge = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
devtool: 'inline-source-map',
|
||||
devServer: {
|
||||
contentBase: '../client/public'
|
||||
}
|
||||
})
|
||||
contentBase: '../client/public',
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.common.js')
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [new TerserPlugin({
|
||||
terserOptions: {
|
||||
ie8: false,
|
||||
safari10: false
|
||||
}
|
||||
})]
|
||||
}
|
||||
})
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
ie8: false,
|
||||
safari10: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue