How to use vue-DevTools in a project
Download the vue-devTools decompression package
- Web disk address extraction code: 4RRI
- Place the devTools folder at the root of your project
Open the/SRC /main/index.dev.js file to modify
require('electron').app.on('ready', () => {//let installExtension = require('electron-devtools-installer')
// console.log(installExtension);
// installExtension.default(installExtension.VUEJS_DEVTOOLS)
// .then(() => {})
// .catch(err => {
// console.log('Unable to install `vue-devtools`: \n', err) / /}) / / install vue - devtools BrowserWindow. AddDevToolsExtension (path) resolve (__dirname,'.. /.. /devTools/vue-devtools'));
})
Copy the code
Reference: www.cnblogs.com/wozho/p/107…
2. The CSS preprocessor does not take effect
Check the package. The json:
Vue-loader version is 15vCopy the code
Cause of the problem
Take the Stylus download as an example
npm i stylus stylus-loader -D
Open /. Electron – vue/webpack. The renderer. Config. Js file modification
Module: {// Other unchanged rules: [{// new ruletest: /\.stylus$/,
use: ['vue-style-loader'.'css-loader'.'stylus-loader'}, {// change use to like thistest: /\.vue$/,
use: 'vue-loader'}},],Copy the code