forked from leebenson/reactql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatic.ts
36 lines (26 loc) · 895 Bytes
/
static.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
// Webpack (static bundling)
// ----------------------------------------------------------------------------
// IMPORTS
/* NPM */
import { mergeWith } from "lodash";
import * as webpack from "webpack";
import {} from "webpack-dev-server";
// Plugin for generating `index.html` file for static hosting
import * as HtmlWebpackPlugin from "html-webpack-plugin";
/* Local */
// Common config
import { defaultMerger } from "./common";
// Get the client-side config as a base to extend
import client from "./client";
// ----------------------------------------------------------------------------
// Augment client-side config with HtmlWebPackPlugin
const base: webpack.Configuration = {
plugins: [
new HtmlWebpackPlugin({
inject: false,
template: "src/views/static.html",
title: "ReactQL app"
})
]
};
export default mergeWith({}, client, base, defaultMerger);