minio / minio-js

MinIO Client SDK for Javascript
https://docs.min.io/docs/javascript-client-quickstart-guide.html
Apache License 2.0
964 stars 283 forks source link

can not run in vue project(base webpackV4) #1113

Closed lukerlv closed 1 year ago

lukerlv commented 1 year ago

image hello, anybody help?

prakashsvmx commented 1 year ago

there were similar issues with react 18. and the solution was to adjust the build. the example can be found in https://github.com/prakashsvmx/minio-js-react-18-build

is there a sample project where we could see the actual configured webpack?

lukerlv commented 1 year ago

@prakashsvmx image hello,my config is here,do you know how to config in webpack?

lukerlv commented 1 year ago

https://github.com/prakashsvmx/minio-js-react-18-build on this demo,can you tell me what is the adjustment? the principle of implementation?

prakashsvmx commented 1 year ago

https://github.com/prakashsvmx/minio-js-react-18-build/blob/main/config-overrides.js

And the packages in packages.json @lukerlv

lukerlv commented 1 year ago

{ "name": "@soul/cli-vue", "version": "1.1.28", "description": "webpack", "author": "nick ", "private": false, "sideEffects": false, "bundleDependencies": false, "scripts": { "publish:beta": "npm version prerelease --preid=beta & npm publish", "publish:rc": "npm version prerelease --preid=rc & npm publish", "publish:release": "npm publish" }, "dependencies": { "@soul/cli-core": "1.1.25", "babel-eslint": "10.0.3", "babel-helper-vue-jsx-merge-props": "2.0.3", "babel-plugin-transform-vue-jsx": "4.0.1", "babel-plugin-transform-remove-console": "^6.9.4", "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-optional-chaining": "^7.18.9", "eslint-config-prettier": "^4.1.0", "eslint-loader": "3.0.0", "eslint-plugin-jsx": "0.1.0", "eslint-plugin-prettier": "^3.0.1", "eslint-plugin-vue": "5.2.3", "iview-loader": "1.2.2", "postcss": "^7.0.32", "postcss-loader": "^3.0.0", "postcss-selector-namespace": "^3.0.1", "prettier": "1.18.2", "vue": "2.6.10", "vue-loader": "^15.7.1", "vue-template-compiler": "2.6.10" }, "peerDependencies": { "eslint": ">= 5", "vue-template-compiler": "2.6.10" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 8" ], "engines": { "node": ">=8.9.1", "npm": ">=5.5.1", "yarn": ">=1.3.2" }, "main": "", "directories": { "lib": "lib" }, "keywords": [ "webpack", "eslint" ], "license": "UNLICENSED" }

lukerlv commented 1 year ago

@prakashsvmx config above

prakashsvmx commented 1 year ago

We are unable to troubleshoot any code specific to your project.

lukerlv commented 1 year ago

@prakashsvmx https://github.com/prakashsvmx/minio-js-react-18-build on this demo,can you tell me what is the adjustment? the principle of implementation?

prakashsvmx commented 1 year ago

@prakashsvmx https://github.com/prakashsvmx/minio-js-react-18-build on this demo,can you tell me what is the adjustment? the principle of implementation?

https://github.com/prakashsvmx/minio-js-react-18-build/blob/main/config-overrides.js

And the packages in packages.json (devDependencies) - Please see the dependency list webpack override is applied via. https://github.com/prakashsvmx/minio-js-react-18-build/blob/main/config-overrides.js

there are no other changes required.

lukerlv commented 1 year ago

@prakashsvmx ok,thank you very much