-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
43 lines (41 loc) · 1.42 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
39
40
41
42
43
const mix = require('laravel-mix')
const path = require('path')
const rootDir = 'src/'
const assetsDir = rootDir + 'assets/'
const distDir = 'dist/'
mix.js(assetsDir + 'js/admin.js', distDir)
.js(assetsDir + 'js/app.js', distDir)
.js(assetsDir + 'js/tainacan-view-modes.js', distDir)
.sass(assetsDir + 'scss/admin.scss', distDir)
.sass(assetsDir + 'scss/app.scss', distDir)
.sourceMaps(true, 'eval-source-map', 'source-map')
.options({
processCssUrls: false,
})
.vue({
compilerOptions: {
whitespace: 'condense',
},
version: 2,
})
.webpackConfig(webpack => ({
output: {
chunkFilename: distDir + '[name].js',
path: path.resolve(__dirname, rootDir),
},
plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: process.env.NODE_ENV,
}),
],
resolve: {
alias: {
'@components': path.resolve(__dirname, assetsDir, 'js/components'),
'@mixins': path.resolve(__dirname, assetsDir, 'js/components/mixins'),
'@pages': path.resolve(__dirname, assetsDir, 'js/pages'),
'@plugins': path.resolve(__dirname, assetsDir, 'js/plugins'),
'@store': path.resolve(__dirname, assetsDir, 'js/store'),
'@utils': path.resolve(__dirname, assetsDir, 'js/utils'),
},
},
}))