-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwebpack.config.js
More file actions
59 lines (54 loc) · 1.86 KB
/
webpack.config.js
File metadata and controls
59 lines (54 loc) · 1.86 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
const glob = require('glob');
const path = require('path');
const fieldtypes = {};
glob.sync(path.join(__dirname, 'fieldtypes/*/*.vue')).forEach(file => {
const type = path.basename(file, '.vue');
fieldtypes['userprofile-' + type] = './fieldtypes/' + type + '/' + type + '.vue';
});
module.exports = [
{
entry: fieldtypes,
output: {
filename: './app/bundle/[name].js',
},
module: {
loaders: [
{test: /\.vue$/, loader: 'vue',},
{test: /\.js/, loader: 'babel', query: {presets: ['es2015',],},},
],
},
},
{
entry: {
/*pagekit addons*/
'link-userprofile': './app/components/link-userprofile.vue',
'user-section-userprofile': './app/components/user-section-userprofile.vue',
'node-user_profiles': './app/components/node-user_profiles.vue',
/*frontpage views*/
'userprofiles': './app/views/profiles.js',
'userprofiles-details': './app/views/profiles-details.js',
'userprofile': './app/views/profile.js',
'registration': './app/views/registration.js',
/*admin views*/
'field-edit': './app/views/admin/edit.js',
'fields': './app/views/admin/fields.js',
'userprofile-settings': './app/views/admin/settings.js',
},
output: {
filename: './app/bundle/[name].js',
},
externals: {
'lodash': '_',
'jquery': 'jQuery',
'uikit': 'UIkit',
'vue': 'Vue',
},
module: {
loaders: [
{test: /\.vue$/, loader: 'vue',},
{ test: /\.html$/, loader: 'vue-html',},
{test: /\.js/, loader: 'babel', query: {presets: ['es2015',],},},
],
},
},
];