是否有人试图将它与Electron一起使用?我无法运行它。
而不是<el-button type="primary" @click.native="test">Primary Button</el-button>
我只看到主要按钮文字。
可能是一些装载机......
以下是我的内容: webpack.config.js
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: './app/main.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'build.js'
},
module: {
loaders: [
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader']
},
{
test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2|svg|svgz)(\?.+)?$/,
loader: 'file'
}]
},
babel: {
"presets": ["es2015"],
"plugins": ["transform-runtime"]
},
plugins: [
new webpack.ExternalsPlugin('commonjs', [
'electron'
])
]
}
Main.js 很简单:
import Vue from 'vue'
import { Button } from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import App from './App.vue'
Vue.use(Button)
new Vue({
el: 'body',
components: { App }
})
这是我的dev-dependencies列表:
依赖项:
由于