-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
88 lines (71 loc) · 3.4 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = (env, argv) => ({
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
},
entry: {
// just create the react-bundle once
//for dev
'static/js/react-bundle': argv.mode === 'production'
? ['./app/static/react_files/react.min.js', './app/static/react_files/react-dom.min.js']
: ['./app/static/react_files/react.development.js', './app/static/react_files/react-dom.development.js'],
//homepage
'/static/js/homepage-app': './app/frontend/src/HomepageApp.js',
//study resource related
'/static/js/study_resource/study-resource-detail-reviews': './app/study_resource/src/StudyResourceDetailReviews.js',
'/static/js/study_resource/study-resource-create': './app/study_resource/src/create/StudyResourceCreate.js',
'/static/js/study_resource/detail-toolbar': './app/study_resource/src/detail/ToolbarApp.js',
'/static/js/study_resource/study-resource-edit': './app/study_resource/src/EditApp.js',
'/static/js/my-study-resources': './app/study_resource/src/MyResourcesApp.js',
//study resource collections
'/static/js/my-study-collections': './app/study_collection/src/MyCollectionsApp.js',
//technology
'/static/js/technology/technology-create': './app/technology/src/TechCreateApp.js',
'/static/js/technology/my-technologies-app': './app/technology/src/MyTechnologiesApp.js',
//concept
'/static/js/concepts/category/edit': './app/concepts/src/category/EditApp.js',
'/static/js/concepts/category/create': './app/concepts/src/category/CreateApp.js',
'/static/js/concepts/technology/edit': './app/concepts/src/technology/EditApp.js',
'/static/js/concepts/technology/create': './app/concepts/src/technology/CreateApp.js',
//vote app
'/static/js/votes': './app/src/core/VotesApp.js',
//subscribe app
'/static/js/subscribe': './app/src/core/SubscribeApp.js',
//search app
'/static/js/navbar-search-bar-app': './app/search/src/NavbarSearchBarApp.js',
'/static/js/search-app': './app/search/src/SearchApp.js',
'/static/js/minimal-search-app': './app/search/src/MinimalSearchApp.js',
//edit suggestions
'/static/js/technology/edit': './app/technology/src/EditApp.js',
'/static/js/study_resource/edit': './app/study_resource/src/EditApp.js',
//sidebar
'/static/js/frontend/sidebar-app': './app/frontend/src/sidebar/SidebarApp.js',
//profile app
'/static/js/navbar-profile-app': './app/frontend/src/NavbarProfileApp.js',
//discussions
'/static/js/discussions': './app/discussions/src/DiscussionsApp.js',
//related section
'/static/js/related-app': './app/frontend/src/RelatedApp.js',
//users
'/static/js/profile-app': './app/users/src/ProfileApp.js',
//history
'/static/js/resource-history': './app/history/src/ResourceHistoryApp.js',
// admin dashboard
'/static/js/dashboard/admin': './app/dashboard/src/AdminApp.js'
},
output: {
filename: '[name].js',
path: __dirname + '/app/'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
}
});