element plus をインスコ
npm install element-plus --save
webpackに追加
webpack.mix.js
mix.webpackConfig(
{
module:
{
rules:
[
{
test: /\.mjs$/,
resolve: { fullySpecified: false },
include: /node_modules/,
type: "javascript/auto"
}
]
},
}
);
絶対パスで読み込みましょう
app.js
import ElementPlus from '/var/www/html/your/node_modules/element-plus/'
import '/var/www/html/your/node_modules/element-plus/dist/index.css'
app.use(ElementPlus)
app.mount('#app');
以上