Skip to content

Commit 24a8586

Browse files
committed
feat: Add webpack config
1 parent 7bfc3ea commit 24a8586

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"in-publish": "^2.0.0",
6464
"istanbul": "^0.4.3",
6565
"jsdoc": "^3.4.0",
66+
"json": "^9.0.3",
6667
"karma": "^0.13.22",
6768
"karma-babel-preprocessor": "^6.0.1",
6869
"karma-chrome-launcher": "^0.2.3",

webpack.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
var path = require('path')
2+
var webpack = require('webpack')
3+
module.exports = {
4+
context: __dirname,
5+
entry: './browser',
6+
output: {
7+
path: path.join(__dirname, 'browser-dist'),
8+
filename: 'contentful-management.js',
9+
library: 'contentful-management'
10+
},
11+
module: {
12+
loaders: [
13+
{
14+
test: /\.js?$/,
15+
exclude: /(node_modules|bower_components|dist)/,
16+
loader: 'babel'
17+
},
18+
{
19+
test: /\.json?$/,
20+
loader: 'json'
21+
}
22+
]
23+
},
24+
plugins: [
25+
new webpack.NormalModuleReplacementPlugin(/\.\/vendor-node\/axios/g, './vendor-browser/axios.js')
26+
]
27+
}

0 commit comments

Comments
 (0)