-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.mix.module.js
44 lines (38 loc) · 1.12 KB
/
webpack.mix.module.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
/**
* Laravel mix - Fancy Imagebar
*
* Output:
* - dist
* - resources
* - css
* - lang (.mo files)
* - views
* FancyImagebarModule.php
* module.php
* LICENSE.md
* README.md
*
*/
let mix = require('laravel-mix');
let config = require('./webpack.mix.config');
// https://github.com/postcss/autoprefixer
const postcssAutoprefixer = require("autoprefixer")();
// https://github.com/elchininet/postcss-rtlcss
const postcssRTLCSS = require('postcss-rtlcss')({safeBothPrefix: true});
const dist_dir = 'dist/jc-fancy-imagebar';
//https://github.com/gregnb/filemanager-webpack-plugin
const FileManagerPlugin = require('filemanager-webpack-plugin');
if (process.env.NODE_ENV === 'production') {
mix.styles(config.public_dir + '/css/style.css', config.build_dir + '/style.css')
} else {
mix
.setPublicPath('./')
.sass('src/sass/style.scss', config.public_dir + '/css/style.css')
.options({
processCssUrls: false,
postCss: [
postcssRTLCSS,
postcssAutoprefixer
]
});
}