-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-build.config.js
More file actions
67 lines (61 loc) · 1.57 KB
/
webpack-build.config.js
File metadata and controls
67 lines (61 loc) · 1.57 KB
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
67
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const CopyPlugin = require('copy-webpack-plugin');
/**
* Extend the default Webpack configuration from nx / ng to add graphql-tag/loader
* this webpack.config is used w/ node:deploy builder
*/
module.exports = (config) => {
// GRAPHQL TAG LOADER
config.module.rules.unshift(
{
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
loader: 'graphql-tag/loader'
}
);
// COPY ALL .graphql FILES INTO BUILD OUTPUT
config.plugins.unshift
(
new CopyPlugin(
{
patterns:
[
// {
// from: './.platform',
// to: '.platform'
// },
// {
// from: './.ebextensions',
// to: '.ebextensions'
// },
{
from: './src/**/*.graphql',
to: 'src/[contenthash].[ext]'
},
// {
// from: './.npmrc',
// to: 'src/..'
// },
// {
// from: './prisma',
// to: 'prisma'
// },
// {
// from: './upload',
// to: 'upload'
// },
// {
// from: './package.json',
// to: 'package.json'
// },
// {
// from: './Procfile',
// to: 'src/..'
// }
]
}
)
);
return config;
};