-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathwebpack.config.js
42 lines (41 loc) · 1.05 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
require('babel-core/register');
const path = require('path');
// require('@babel/register');
console.log('load webpack.config.js');
module.exports = {
entry: {
main: './src/ZenzaWatchIndex.js'
},
output: {
filename: '[name].js',
path: `${__dirname}/lib`,
},
module: {
loaders: [{
test: /\.m?jsx?$/,
include: [
// `${__dirname}/src`,
`${__dirname}/test`,
],
exclude: [
/node_modules/,
// `./src/browser.js`
],
loader: 'babel-loader',
query: {
// presets: ['es2015', 'stage-3']
presets: ['es2015', 'stage-3']
}
}],
},
devtool: 'inline-source-map',
devServer: {
contentBase: path.resolve(__dirname, 'test/browser'),
headers: {
"Access-Control-Allow-Origin": "https://www.nicovideo.jp",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Headers": "Content-Type, Authorization, x-id, Content-Length, X-Requested-With",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS"
}
}
};