forked from nonamez/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
59 lines (51 loc) · 1.52 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const mix = require('laravel-mix'),
path = require('path'),
webpack = require('webpack'),
tailwindcss = require('tailwindcss');
mix.options({
clearConsole: true,
processCssUrls: true,
postCss: [
tailwindcss('./tailwind.config.js'),
]
});
mix.webpackConfig({
module: {
rules: [
{
enforce: 'pre',
exclude: /node_modules/,
loader: 'eslint-loader',
test: /\.(js|vue)?$/
}
]
},
plugins: [
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: false,
__VUE_PROD_DEVTOOLS__: false,
}),
],
resolve: {
alias: {
helpers: path.resolve(__dirname, 'resources/js/dashboard/helpers'),
store: path.resolve(__dirname, 'resources/js/dashboard/store'),
modules: path.resolve(__dirname, 'resources/js/dashboard/modules'),
// components: path.resolve(__dirname, 'resources/js/components'),
partials: path.resolve(__dirname, 'resources/js/dashboard/partials'),
// 'event-bus': path.resolve(__dirname, 'resources/js/event-bus.js'),
// sass: path.join(__dirname, 'resources/sass')
}
}
});
mix.version();
if (mix.inProduction()) {
mix.sourceMaps();
}
mix.sass('resources/sass/blog/styles.scss', 'public/css/blog.css').js('resources/js/blog/app.js', 'public/js/blog.js')
mix.sass('resources/sass/dashboard/styles.scss', 'public/css/dashboard.css').js('resources/js/dashboard/app.js', 'public/js/dashboard.js').vue();
mix.js('resources/js/app.js', 'public/js').postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
]);