Skip to content

Commit d42e755

Browse files
committed
Revert "multiple webpack configurations(8601d29)", fixed #11
1 parent 43be935 commit d42e755

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
3+
webpack
4+
5+
cd crx
6+
webpack

crx/webpack.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
var path = require('path');
2+
3+
module.exports = {
4+
entry: {
5+
content: './content.js'
6+
},
7+
output: {
8+
filename: '[name].js',
9+
path: path.join(__dirname, 'build')
10+
},
11+
module: {
12+
loaders: [{
13+
test: /dist\/parrot\.js$/,
14+
loader: 'raw-loader'
15+
}]
16+
}
17+
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"browser": "./dist/parrot.js",
66
"main": "./src/server.js",
77
"scripts": {
8-
"build": "webpack",
8+
"build": "sh build.sh",
99
"zip": "zip -r dist/crx.zip crx",
1010
"prepublish": "npm run build && npm run zip",
1111
"test": "jest",

webpack.config.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
11
var path = require('path');
22

3-
module.exports = [{
3+
module.exports = {
44
entry: {
55
parrot: ['./src/browser.js']
66
},
77
output: {
88
filename: '[name].js',
99
path: path.join(__dirname, 'dist')
1010
}
11-
}, {
12-
entry: {
13-
content: './crx/content.js'
14-
},
15-
output: {
16-
filename: '[name].js',
17-
path: path.join(__dirname, 'crx/build')
18-
},
19-
module: {
20-
loaders: [{
21-
test: /dist\/parrot\.js$/,
22-
loader: 'raw-loader'
23-
}]
24-
}
25-
}];
11+
};

0 commit comments

Comments
 (0)