-
Notifications
You must be signed in to change notification settings - Fork 122
/
webpack.mix.js
55 lines (52 loc) · 1.61 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
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Framework Configuration
|--------------------------------------------------------------------------
|
| Themosis framework configuration. Let's expose the Themosis core
| object to users so they can register custom fields and other utilities
| for their project in their own scripts.
|
*/
mix.webpackConfig(webpack => {
return {
output: {
library: 'Themosis',
libraryExport: 'default'
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".json"]
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/
},
{
test: /\.scss$/,
loader: "sass-loader"
}
]
},
externals: {
jquery: 'jQuery',
lodash: 'lodash',
'lodash-es': 'lodash'
}
};
});
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your application. By default, we are compiling the Sass
| file, as well as bundling up your JS files.
|
*/
mix.js('resources/js/index.ts', 'dist/js/themosis.core.js').react();
mix.js('resources/js/deprecated/poststatus.js', 'dist/js/themosis.poststatus.js');