-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.mix.js
37 lines (34 loc) · 975 Bytes
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// webpack.mix.js
let mix = require('laravel-mix');
const AutoImport = require("unplugin-auto-import/webpack");
const {ElementPlusResolver} = require("unplugin-vue-components/resolvers");
const Components = require("unplugin-vue-components/webpack");
var path = require('path');
mix.webpackConfig({
module: {
rules: [{
test: /\.mjs$/,
resolve: {fullySpecified: false},
include: /node_modules/,
type: "javascript/auto"
}]
},
plugins: [
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
directives: false
}),
],
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': path.resolve(__dirname, 'src')
}
}
});
mix.js('src/app.js', 'dist').vue({ version: 3 })
.copy('src/images', 'dist/images')
.setPublicPath('dist');