node 16.13

This commit is contained in:
Vitaliy Snurnitsin 2022-01-10 01:56:10 +03:00
parent d3b5a77efb
commit f180a9cc5a
7 changed files with 11824 additions and 5467 deletions

View File

@ -1,4 +1,4 @@
FROM node:14.2-alpine3.11 AS frontend-builder FROM node:16.13.0-alpine3.12 AS frontend-builder
COPY frontend/ /app COPY frontend/ /app
RUN cd /app && npm install && npm run build RUN cd /app && npm install && npm run build

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
image="node:14.2-alpine3.11" image="node:16.13.0-alpine3.12"
uid="$(id -u $USER)" uid="$(id -u $USER)"
docker run -u $uid -w /app -v $(pwd):/app $image npm i && \ docker run -u $uid -w /app -v $(pwd):/app $image npm i && \

17058
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,16 +7,16 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot", "dev": "cross-env NODE_ENV=development webpack-dev-server --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules" "build": "cross-env NODE_ENV=production webpack --progress"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.24.0",
"bootstrap-vue": "^2.21.2", "bootstrap-vue": "^2.21.2",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"vue": "^2.6.12", "vue": "^2.6.14",
"vue-clipboard2": "^0.2.1", "vue-clipboard2": "^0.3.3",
"vue-cookies": "^1.7.4", "vue-cookies": "^1.7.4",
"vue-good-table": "^2.21.1", "vue-good-table": "^2.21.11",
"vue-notification": "^1.3.20" "vue-notification": "^1.3.20"
}, },
"browserslist": [ "browserslist": [
@ -25,23 +25,23 @@
"not ie <= 8" "not ie <= 8"
], ],
"devDependencies": { "devDependencies": {
"@babel/core": "^7.8.6", "@babel/core": "^7.16.5",
"@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-proposal-json-strings": "^7.16.7",
"@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.0.0", "@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/preset-env": "^7.0.0", "@babel/preset-env": "^7.16.5",
"babel-loader": "^8.0.0", "babel-loader": "^8.2.3",
"cross-env": "^7.0.0", "cross-env": "^7.0.3",
"css-loader": "^3.4.2", "css-loader": "^6.5.1",
"file-loader": "^5.1.0", "file-loader": "^6.2.0",
"node-sass": "^4.13.1", "node-sass": "^7.0.1",
"sass-loader": "^8.0.2", "sass-loader": "^12.4.0",
"terser-webpack-plugin": "^2.3.5", "terser-webpack-plugin": "^5.3.0",
"vue-loader": "^15.9.0", "vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.11", "vue-template-compiler": "^2.6.14",
"webpack": "^4.42.0", "webpack": "^5.65.0",
"webpack-cli": "^3.3.11", "webpack-cli": "^4.9.1",
"webpack-dev-server": "^3.10.3" "webpack-dev-server": "^4.7.2"
} }
} }

View File

@ -1,9 +1,11 @@
var path = require('path') // Generated using webpack-cli https://github.com/webpack/webpack-cli
var webpack = require('webpack')
const TerserPlugin = require('terser-webpack-plugin');
module.exports = { const path = require('path');
mode: 'production',
const isProduction = process.env.NODE_ENV == 'production';
const config = {
entry: { entry: {
bundle: [ bundle: [
'./src/main.js', './src/main.js',
@ -17,6 +19,8 @@ module.exports = {
publicPath: '/dist/', publicPath: '/dist/',
filename: '[name].min.js' filename: '[name].min.js'
}, },
plugins: [
],
module: { module: {
rules: [ rules: [
{ {
@ -26,14 +30,15 @@ module.exports = {
'css-loader' 'css-loader'
], ],
}, },
{ {
test: /\.js$/, test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader', loader: 'babel-loader',
exclude: /node_modules/ options: {
presets: ['@babel/preset-env']
} }
},
] ],
}, },
resolve: { resolve: {
alias: { alias: {
@ -41,30 +46,10 @@ module.exports = {
}, },
extensions: ['*', '.js', '.vue', '.json'] extensions: ['*', '.js', '.vue', '.json']
}, },
devServer: { };
historyApiFallback: true,
noInfo: true,
overlay: true
},
performance: {
hints: false
},
}
if (process.env.NODE_ENV === 'production') { module.exports = () => {
module.exports.devtool = 'false' config.mode = 'production';
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([ return config;
new webpack.DefinePlugin({ };
'process.env': {
NODE_ENV: '"production"'
}
}),
new TerserPlugin({
sourceMap: false
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
}

View File

@ -4,7 +4,7 @@ apt-get update
apt-get install -y curl apt-get install -y curl
apt-get install -y libc6 libc6-dev gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu apt-get install -y libc6 libc6-dev gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu
curl -sL https://deb.nodesource.com/setup_14.x | bash - curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs apt-get install -y nodejs
PATH=$PATH:~/go/bin PATH=$PATH:~/go/bin

View File

@ -4,7 +4,7 @@ apt-get update
apt-get install -y curl apt-get install -y curl
apt-get install -y libc6 libc6-dev libc6-dev-i386 apt-get install -y libc6 libc6-dev libc6-dev-i386
curl -sL https://deb.nodesource.com/setup_14.x | bash - curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs apt-get install -y nodejs
PATH=$PATH:~/go/bin PATH=$PATH:~/go/bin