generated from yandex-praktikum/middle.messenger.praktikum.yandex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.ts
42 lines (39 loc) · 952 Bytes
/
webpack.dev.ts
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
import CircularDependencyPlugin from "circular-dependency-plugin";
import Dotenv from "dotenv-webpack";
import webpack from "webpack";
import webpackDevServer from "webpack-dev-server";
import { merge } from "webpack-merge";
import common from "./webpack.common";
const config: webpack.Configuration | webpackDevServer.Configuration = merge(common, {
mode: "development",
devtool: "source-map",
output: {
filename: "[name].js",
},
devServer: {
port: 3000,
historyApiFallback: true,
open: false,
},
module: {
rules: [
{
test: /\.s[ca]ss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
],
},
plugins: [
new Dotenv({
path: ".env.development",
}),
new CircularDependencyPlugin({
exclude: /node_modules/,
include: /src/,
failOnError: true,
allowAsyncCycles: false,
cwd: process.cwd(),
}),
],
});
export default config;