forked from DISIC/rgaa_bibliotheques-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
46 lines (43 loc) · 1.36 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
var path = require('path');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var fullPath = path.resolve.bind(null, __dirname);
/**
*
*/
module.exports = {
entry: {
'rgaa-angular-bootstrap': fullPath('./src/angular-bootstrap/index.js'),
'rgaa-jquery-ui': fullPath('./src/jquery-ui/index.js'),
'rgaa-react-bootstrap': fullPath('./src/react-bootstrap/index.js')
},
output: {
path: 'dist',
filename: '[name].js'
},
externals: {
'angular': 'angular',
'jquery': 'jQuery'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'jsx-loader',
include: fullPath('src/react')
}
]
},
plugins: [
new CopyWebpackPlugin([
{ from: 'node_modules/jquery/dist/jquery.js', to: 'jquery.js' },
{ from: 'node_modules/jquery-ui-dist/jquery-ui.min.js', to: 'jquery-ui.js' },
{ from: 'node_modules/angular/angular.js', to: 'angular.js' },
{ from: 'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js', to: 'angular-ui-bootstrap.js' },
{ from: 'node_modules/highlightjs/highlight.pack.js', to: 'highlight.js' },
{ from: 'node_modules/bootstrap/dist/css/bootstrap.css', to: 'bootstrap.css' },
{ from: 'node_modules/bootstrap/dist/css/bootstrap-theme.css', to: 'bootstrap-theme.css' },
{ from: 'node_modules/highlightjs/styles/github.css', to: 'github.css' },
{ from: 'node_modules/jquery-ui/themes/base', to: 'jquery-ui' }
])
]
};