0
1
Fork 0

package fix

This commit is contained in:
William Buezas 2024-07-17 15:45:56 -03:00
parent 8bea750244
commit 9dfeb2f7ef
3 changed files with 26177 additions and 25839 deletions

51599
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,85 +1,89 @@
{ {
"name": "hedera-web", "name": "hedera-web",
"version": "22.48.2", "version": "22.48.2",
"description": "Verdnatura web page", "description": "Verdnatura web page",
"license": "GPL-3.0", "license": "GPL-3.0",
"author": "Juan Ferrer Toribio <juan@verdnatura.es>", "author": "Juan Ferrer Toribio <juan@verdnatura.es>",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.verdnatura.es/hedera-web" "url": "https://git.verdnatura.es/hedera-web"
}, },
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "^7.13.14", "@babel/eslint-parser": "^7.13.14",
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.20.2",
"@intlify/vue-i18n-loader": "^4.2.0", "@intlify/vue-i18n-loader": "^4.2.0",
"@quasar/app-webpack": "^3.0.0", "@quasar/app-webpack": "^3.0.0",
"archiver": "^5.3.1", "archiver": "^5.3.1",
"assets-webpack-plugin": "^7.1.1", "assets-webpack-plugin": "^7.1.1",
"babel-loader": "^9.1.0", "babel-loader": "^9.1.0",
"bundle-loader": "^0.5.6", "bundle-loader": "^0.5.6",
"css-loader": "^7.1.2", "css-loader": "^5.2.7",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.0.0", "eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.19.1", "eslint-plugin-import": "^2.19.1",
"eslint-plugin-n": "^15.0.0", "eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.0.0", "eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^9.27.0", "eslint-plugin-vue": "^9.27.0",
"eslint-webpack-plugin": "^3.1.1", "eslint-webpack-plugin": "^3.1.1",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
"glob": "^8.0.3", "glob": "^8.0.3",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"json-loader": "^0.5.7", "json-loader": "^0.5.7",
"mini-css-extract-plugin": "^2.7.0", "mini-css-extract-plugin": "^2.7.0",
"node-sass": "^7.0.1", "node-sass": "^7.0.1",
"raw-loader": "^4.0.2", "postcss": "^8.4.39",
"sass-loader": "^12.6.0", "postcss-import": "^13.0.0",
"style-loader": "^3.3.4", "postcss-loader": "^4.3.0",
"url-loader": "^4.1.1", "postcss-url": "^10.1.3",
"webpack": "^5.75.0", "raw-loader": "^4.0.2",
"webpack-cli": "^4.10.0", "sass-loader": "^12.6.0",
"webpack-dev-server": "^4.11.1", "style-loader": "^3.3.1",
"webpack-merge": "^5.8.0", "url-loader": "^4.1.1",
"yaml-loader": "^0.5.0" "webpack": "^5.75.0",
}, "webpack-cli": "^4.10.0",
"dependencies": { "webpack-dev-server": "^4.11.1",
"@quasar/extras": "^1.0.0", "webpack-merge": "^5.8.0",
"axios": "^0.21.1", "yaml-loader": "^0.5.0"
"core-js": "^3.6.5", },
"js-yaml": "^3.12.1", "dependencies": {
"mootools": "^1.5.2", "@quasar/extras": "^1.0.0",
"pinia": "^2.0.11", "axios": "^0.21.1",
"promise-polyfill": "^8.2.3", "core-js": "^3.6.5",
"quasar": "^2.6.0", "js-yaml": "^3.12.1",
"require-yaml": "0.0.1", "mootools": "^1.5.2",
"tinymce": "^6.3.0", "pinia": "^2.0.11",
"vue": "^3.0.0", "promise-polyfill": "^8.2.3",
"vue-i18n": "^9.0.0", "quasar": "^2.6.0",
"vue-router": "^4.0.0" "require-yaml": "0.0.1",
}, "tinymce": "^6.3.0",
"scripts": { "vue": "^3.0.0",
"front": "webpack serve --open", "vue-i18n": "^9.0.0",
"back": "cd ../vn-database && myvc start && cd ../salix && gulp backOnly", "vue-router": "^4.0.0"
"build": "rm -rf build/ ; webpack", },
"clean": "rm -rf build/", "scripts": {
"lint": "eslint --ext .js,.vue ./" "front": "webpack serve --open",
}, "back": "cd ../vn-database && myvc start && cd ../salix && gulp backOnly",
"browserslist": [ "build": "rm -rf build/ ; webpack",
"last 10 Chrome versions", "clean": "rm -rf build/",
"last 10 Firefox versions", "lint": "eslint --ext .js,.vue ./"
"last 4 Edge versions", },
"last 7 Safari versions", "browserslist": [
"last 8 Android versions", "last 10 Chrome versions",
"last 8 ChromeAndroid versions", "last 10 Firefox versions",
"last 8 FirefoxAndroid versions", "last 4 Edge versions",
"last 10 iOS versions", "last 7 Safari versions",
"last 5 Opera versions" "last 8 Android versions",
], "last 8 ChromeAndroid versions",
"engines": { "last 8 FirefoxAndroid versions",
"node": ">= 12.22.1", "last 10 iOS versions",
"npm": ">= 6.13.4", "last 5 Opera versions"
"yarn": ">= 1.21.1" ],
} "engines": {
"node": ">= 12.22.1",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
} }

View File

@ -11,126 +11,145 @@ const outputPath = path.join(__dirname, wpConfig.buildDir);
const publicPath = '/' + wpConfig.buildDir + '/'; const publicPath = '/' + wpConfig.buildDir + '/';
const baseConfig = { const baseConfig = {
entry: wpConfig.entry, entry: wpConfig.entry,
mode: devMode ? 'development' : 'production', mode: devMode ? 'development' : 'production',
output: { output: {
path: outputPath, path: outputPath,
publicPath: publicPath publicPath: publicPath
}, },
module: { module: {
rules: [ rules: [
{ {
test: /\.m?js$/, test: /\.m?js$/,
exclude: /(node_modules|bower_components)/, exclude: /(node_modules|bower_components)/,
use: { use: {
loader: 'babel-loader', loader: 'babel-loader',
options: { options: {
presets: ['@babel/preset-env'] presets: ['@babel/preset-env']
} }
} }
}, { },
test: /tinymce\/.*\/skin\.css$/i, {
use: [MiniCssExtractPlugin.loader, 'css-loader'] test: /tinymce\/.*\/skin\.css$/i,
}, { use: [MiniCssExtractPlugin.loader, 'css-loader']
test: /tinymce\/.*\/content\.css$/i, },
loader: 'css-loader', {
options: {esModule: false} test: /tinymce\/.*\/content\.css$/i,
}, { loader: 'css-loader',
test: /\.css$/, options: { esModule: false }
use: ['style-loader', 'css-loader'], },
exclude: [/node_modules/] {
}, { test: /\.css$/,
test: /\.yml$/, use: ['style-loader', 'css-loader'],
use: ['json-loader', 'yaml-loader'] exclude: [/node_modules/]
}, { },
test: /\.xml$/, {
use: 'raw-loader' test: /\.yml$/,
}, { use: ['json-loader', 'yaml-loader']
test: /\.ttf$/, },
type: 'asset/resource' {
}, { test: /\.xml$/,
test: /\.scss$/, use: 'raw-loader'
use: [ },
'style-loader', {
'css-loader', test: /\.ttf$/,
{ type: 'asset/resource'
loader: 'sass-loader', },
options: { {
sourceMap: true test: /\.scss$/,
} use: [
} 'style-loader',
] 'css-loader',
} {
] loader: 'sass-loader',
}, options: {
resolve: { sourceMap: true
modules: [ }
__dirname +'/js', }
__dirname, ]
__dirname +'/forms', },
'node_modules', {
'/usr/lib/node_modules' test: /\.(woff|woff2)$/,
] use: [
}, {
node: { loader: 'file-loader',
__dirname: true options: {
}, name: '[name].[ext]',
plugins: [ outputPath: 'fonts/'
new AssetsWebpackPlugin({ }
path: outputPath }
}), ]
new webpack.DefinePlugin({ }
_DEV_MODE: devMode, ]
_DEV_SERVER_PORT: wpConfig.devServerPort, },
_PUBLIC_PATH: JSON.stringify(publicPath) resolve: {
}), modules: [
new MiniCssExtractPlugin() __dirname + '/js',
], __dirname,
optimization: { __dirname + '/forms',
runtimeChunk: true, 'node_modules',
splitChunks: { '/usr/lib/node_modules'
chunks: 'all', ]
} },
}, node: {
watchOptions: { __dirname: true
ignored: /node_modules/ },
} plugins: [
new AssetsWebpackPlugin({
path: outputPath
}),
new webpack.DefinePlugin({
_DEV_MODE: devMode,
_DEV_SERVER_PORT: wpConfig.devServerPort,
_PUBLIC_PATH: JSON.stringify(publicPath)
}),
new MiniCssExtractPlugin()
],
optimization: {
runtimeChunk: true,
splitChunks: {
chunks: 'all'
}
},
watchOptions: {
ignored: /node_modules/
}
}; };
const prodConfig = { const prodConfig = {
output: { output: {
filename: '[name].[chunkhash].js', filename: '[name].[chunkhash].js',
chunkFilename: 'chunk.[id].[chunkhash].js' chunkFilename: 'chunk.[id].[chunkhash].js'
}, },
optimization: { optimization: {
moduleIds: 'deterministic' moduleIds: 'deterministic'
}, },
devtool: 'source-map' devtool: 'source-map'
}; };
const devConfig = { const devConfig = {
output: { output: {
filename: '[name].js', filename: '[name].js',
chunkFilename: 'chunk.[id].js' chunkFilename: 'chunk.[id].js'
}, },
optimization: { optimization: {
moduleIds: 'named' moduleIds: 'named'
}, },
devtool: 'eval', devtool: 'eval',
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',
static: __dirname, static: __dirname,
port: wpConfig.devServerPort, port: wpConfig.devServerPort,
headers: {'Access-Control-Allow-Origin': '*'}, headers: { 'Access-Control-Allow-Origin': '*' },
//stats: { chunks: false }, //stats: { chunks: false },
proxy: { proxy: {
'/api': 'http://localhost:3000', '/api': 'http://localhost:3000',
'/': { '/': {
target: 'http://localhost/projects/hedera-web', target: 'http://localhost/projects/hedera-web',
bypass: (req) => req.path !== '/' ? req.path : null bypass: req => (req.path !== '/' ? req.path : null)
} }
} }
} }
}; };
const mrgConfig = devMode ? devConfig : prodConfig; const mrgConfig = devMode ? devConfig : prodConfig;