-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.config.js
61 lines (59 loc) · 1.69 KB
/
webpack.config.js
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
const path = require('path');
const uuid = require('uuid');
module.exports = {
entry: {
bundle: './src/index.js',
panelReusing: './src/examples/panel-reusing/panel-reusing-example.js',
rbAccount: './src/examples/rb-account/rb-account-example.js',
inlineVideo: './src/examples/inline-videos/render-inline-video-example.js',
resolveImageUrl: './src/examples/images/image-sources.js',
resolveTranslation: './src/examples/translations/resolve-translation-example.js',
storedQueries: './src/examples/stored-queries/stored-queries-example.js'
},
mode: 'development',
output: {
uniqueName: `custom-script-${uuid.v4()}`,
library: {
name:'customScript',
type: 'amd'
},
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
publicPath: ''
},
devServer: {
port: 8080,
static: {
directory: path.join(__dirname, 'dist')
},
headers: {
'Access-Control-Allow-Origin': '*'
},
compress: true,
https: true
},
module: {
rules: [
{
test: /\.css$/,
use: [
{ loader: 'css-loader' }
]
},
{
test: /\.md$/,
use: [
{
loader: "html-loader"
},
{
loader: "markdown-loader",
options: {
/* your options here */
}
}
]
}
]
}
};