2022-09-02 14:55:26 +02:00
|
|
|
import path from "path";
|
|
|
|
import { merge } from "webpack-merge";
|
|
|
|
import common from "./webpack.common.js";
|
|
|
|
import LocalTunnelPlugin from "webpack-plugin-localtunnel";
|
|
|
|
import { fileURLToPath } from "url";
|
|
|
|
|
|
|
|
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
2021-11-14 20:56:10 +01:00
|
|
|
|
|
|
|
const prefix =
|
2022-09-02 14:55:26 +02:00
|
|
|
process.env.TUNNEL_PREFIX || Math.random().toString().substring(2, 10);
|
2021-11-14 20:56:10 +01:00
|
|
|
|
2022-09-02 14:55:26 +02:00
|
|
|
export default merge(common, {
|
2022-06-11 15:15:17 +02:00
|
|
|
mode: "development",
|
2021-11-14 20:56:10 +01:00
|
|
|
watchOptions: {
|
2022-06-11 15:15:17 +02:00
|
|
|
ignored: ["node_modules/**"],
|
2021-11-14 20:56:10 +01:00
|
|
|
},
|
|
|
|
devServer: {
|
2022-09-02 14:55:26 +02:00
|
|
|
contentBase: path.join(dirname, "dist"),
|
2022-06-11 15:15:17 +02:00
|
|
|
public: prefix + "-ricochet.loca.lt",
|
2021-11-14 20:56:10 +01:00
|
|
|
compress: true,
|
2022-06-11 15:15:17 +02:00
|
|
|
allowedHosts: [".loca.lt"],
|
2021-11-14 20:56:10 +01:00
|
|
|
port: 9000,
|
|
|
|
},
|
2022-09-02 14:55:26 +02:00
|
|
|
plugins: [new LocalTunnelPlugin({ subdomain: prefix + "-ricochet" })],
|
2021-11-14 20:56:10 +01:00
|
|
|
});
|