forked from laravel-streams/streams-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
32 lines (29 loc) · 1.05 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
let mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
mix
.js('resources/lib/index.js', 'resources/public/js')
.sass('resources/scss/variables.scss', 'resources/public/css')
.sass('resources/scss/tailwind.scss', 'resources/public/css')
.sass('resources/scss/theme.scss', 'resources/public/css')
.copyDirectory('resources/public', '../../../public/vendor/streams/ui')
.options({
processCssUrls: false,
postCss: [tailwindcss('./tailwind.config.js')],
})
.webpackConfig(
function (webpack) {
return {
externals: {
'@streams/core': ['streams', 'core'],
'axios': ['streams', 'core', 'axios'],
},
output: {
library: ['streams', 'ui'],
libraryTarget: 'window',
}
};
})
.override(config => {
config.entry['/resources/public/js/index'] = config.entry['/resources/public/js/index'].reverse()
})
.sourceMaps();