forked from carteb/carte-blanche
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.prod.babel.js
More file actions
31 lines (29 loc) · 783 Bytes
/
Copy pathwebpack.prod.babel.js
File metadata and controls
31 lines (29 loc) · 783 Bytes
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
/* eslint-disable no-var */
var path = require('path');
const MATCH_ALL_NON_RELATIVE_IMPORTS = /^\w.*$/i;
module.exports = {
output: {
filename: '[name].js',
library: 'carte-blanche-react-plugin',
libraryTarget: 'commonjs2',
path: path.join(__dirname, 'dist'), // where to place webpack files
},
entry: {
'frontend/index': './frontend/index.js',
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
},
{
test: /\.css$/,
// eslint-disable-next-line max-len
loader: 'style-loader!css-loader?modules&importLoaders=1&localIdentName=carte-blancheReactPlugin__[local]__[hash:base64:5]!postcss-loader',
},
],
},
externals: [MATCH_ALL_NON_RELATIVE_IMPORTS],
target: 'web',
};