-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
66 lines (62 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
60
61
62
63
64
65
66
const BrowserSyncPlugin = require('browser-sync-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const mix = require('laravel-mix');
mix
.js(
"./src/entry.ts",
`${process.env.MIX_PUBLIC}/entry.js`
)
.sass(
"./src/styles/master.sass",
`${process.env.MIX_PUBLIC}/entry.css`
)
//.copyDirectory('src/assets', `${process.env.MIX_PUBLIC}`/assets`)
.sourceMaps()
.disableNotifications()
.webpackConfig({
optimization: {
minimizer: [new UglifyJsPlugin()],
},
node: {
fs: 'empty',
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/
}
]
},
resolve: {
extensions: [
'.tsx',
'.ts',
'.js'
],
},
plugins: [
new BrowserSyncPlugin({
host: 'localhost',
port: 6190,
server: {
baseDir: [
process.env.MIX_PUBLIC
]
}
}),
]
})
.options({
uglify: {
uglifyOptions: {
warnings: false,
comments: false,
beautify: false,
compress: {
drop_console: true,
}
}
}
});