-
Notifications
You must be signed in to change notification settings - Fork 15
/
webpack.mix.js
38 lines (35 loc) · 1.07 KB
/
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
38
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/admin')
}
}
});
mix
.js('src/admin/app.js', 'dist/admin/app.js').vue({ version: 3 })
.js('src/public/magic_url.js', 'dist/public/fls_login.js')
.js('src/public/login_helper.js', 'dist/public/login_helper.js')
.copy('src/images', 'dist/images');