-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.cjs
46 lines (44 loc) · 1008 Bytes
/
webpack.mix.cjs
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
const mix = require("laravel-mix");
const webpack = require("webpack");
require("dotenv").config({ path: "./.env" });
const webpackConfig = {
plugins: [
new webpack.DefinePlugin({
VERSION: JSON.stringify(require("./package.json").version),
}),
new webpack.DefinePlugin({
"process.env": JSON.stringify(process.env),
}),
],
module: {
rules: [
{
resolve: {
fullySpecified: false,
},
},
],
},
resolve: {
fallback: {
crypto: false,
path: false,
fs: false,
buffer: false,
os: false,
https: false,
http: false,
stream: false,
},
},
};
mix
.setPublicPath("./public")
.webpackConfig(webpackConfig)
.sass("src/styles/style.scss", "public/styles")
.ts("src/app/app.tsx", "public/js")
.copy("node_modules/@urdeveloper/sql.js/dist/sql-wasm.wasm", "public/js")
.copy("src/assets", "public/assets")
.copy("src/app/index.html", "public")
.react()
.sourceMaps();