步骤
1
npm install -g @vue/cli
vue create crowdfunding
生成目录
├── package.json
├── public
│ ├── index.html
└── src
├── App.vue
├── assets
│ └── logo.png
├── components
│ ├── CrowdFund.vue
│ └── HelloWorld.vue
└── main.js
2 合约
truffle init
npm install --save truffle-contract web3
3 报错问题
vue.config.js
const { defineConfig } = require('@vue/cli-service');
const path = require('path');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = {
configureWebpack: {
plugins: [
new NodePolyfillPlugin({})
]
},
transpileDependencies: true,
};
编译合约 编译的版本问题
compilers: {
solc: {
version: "0.4.26", // Fetch exact version from solc-bin (defaul