This commit is contained in:
Georges KABBOUCHI 2022-11-23 21:15:40 +02:00
parent 7605997d3d
commit ef8b9ddab3
3 changed files with 1551 additions and 2108 deletions

View File

@ -23,20 +23,20 @@
"dependencies": { "dependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.1.1", "@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4", "@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@instadapp/vue-web3": "latest", "@instadapp/vue-web3": "^0.9.7",
"@nuxt/kit": "^3.0.0-rc.11", "@nuxt/kit": "^3.0.0",
"events": "^3.3.0", "events": "^3.3.0",
"mkdirp-promise": "4", "mkdirp-promise": "4",
"rollup-plugin-node-polyfills": "^0.2.1" "rollup-plugin-node-polyfills": "^0.2.1"
}, },
"devDependencies": { "devDependencies": {
"@nuxt/module-builder": "latest", "@nuxt/module-builder": "^0.2.1",
"@nuxt/ui": "^0.3.3", "@nuxt/ui": "^0.3.3",
"@nuxtjs/eslint-config-typescript": "11.0.0", "@nuxtjs/eslint-config-typescript": "11.0.0",
"@web3-react/injected-connector": "^6.0.7", "@web3-react/injected-connector": "^6.0.7",
"@web3-react/network-connector": "^6.2.9", "@web3-react/network-connector": "^6.2.9",
"@web3-react/walletconnect-connector": "^6.2.13", "@web3-react/walletconnect-connector": "^6.2.13",
"eslint": "8.24.0", "eslint": "8.24.0",
"nuxt": "^3.0.0-rc.11" "nuxt": "^3.0.0"
} }
} }

View File

@ -1,9 +1,4 @@
import { import { addImports, defineNuxtModule, extendViteConfig } from '@nuxt/kit'
addAutoImport,
addImportsDir,
defineNuxtModule,
extendViteConfig,
} from '@nuxt/kit'
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
import rollupNodePolyFill from 'rollup-plugin-node-polyfills' import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
@ -20,15 +15,6 @@ export default defineNuxtModule<ModuleOptions>({
autoImport: true, autoImport: true,
}, },
setup(options, nuxt) { setup(options, nuxt) {
// nuxt.hook('vite:extendConfig', (clientConfig, { isClient }) => {
// if (isClient && process.env.NODE_ENV === 'production') {
// clientConfig.resolve.alias = {
// ...clientConfig.resolve.alias,
// web3: resolve('./node_modules/web3/dist/web3.min.js')
// }
// }
// })
extendViteConfig((config) => { extendViteConfig((config) => {
config.build = config.build || {} config.build = config.build || {}
config.build.rollupOptions = config.build.rollupOptions || {} config.build.rollupOptions = config.build.rollupOptions || {}
@ -54,7 +40,7 @@ export default defineNuxtModule<ModuleOptions>({
}) })
if (options.autoImport) { if (options.autoImport) {
addAutoImport({ addImports({
name: 'useWeb3', name: 'useWeb3',
from: '@instadapp/vue-web3', from: '@instadapp/vue-web3',
}) })

File diff suppressed because it is too large Load Diff