Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
💩 refactor: optimze some webpack and manifest configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjx666 committed Nov 24, 2019
1 parent 6409af2 commit 31b7d6a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
8 changes: 4 additions & 4 deletions server/configs/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
hotUpdateMainFilename: 'hot/[hash].hot-update.json',
},
watchOptions: {
ignored: /node_modules/,
ignored: [/node_modules/, /dist/, /docs/, /server/],
},
module: {
rules: [
Expand All @@ -44,7 +44,7 @@ module.exports = {
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [autoprefixer({})],
plugins: [autoprefixer()],
},
},
],
Expand All @@ -60,7 +60,7 @@ module.exports = {
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [autoprefixer({})],
plugins: [autoprefixer()],
},
},
{
Expand All @@ -82,7 +82,7 @@ module.exports = {
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [autoprefixer({})],
plugins: [autoprefixer()],
},
},
'sass-loader',
Expand Down
2 changes: 1 addition & 1 deletion server/configs/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = merge.smart(common, {
{ from: resolve(projectRoot, 'src/manifest.dev.json'), to: 'manifest.json' },
]),
new CircularDependencyPlugin({
exclude: /a\.js|node_modules/,
exclude: /node_modules/,
failOnError: false,
}),
],
Expand Down
9 changes: 1 addition & 8 deletions src/manifest.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
"version": "1.0",
"description": "牛客网 chrome 扩展",
"manifest_version": 2,
"permissions": [
"storage",
"declarativeContent",
"webRequest",
"storage",
"notifications",
"https://www.nowcoder.com/*"
],
"permissions": ["storage", "webRequest", "notifications", "https://www.nowcoder.com/*"],
"content_security_policy": "script-src 'self' 'unsafe-eval' http://localhost:3000; object-src 'self';",
"minimum_chrome_version": "68",
"background": {
Expand Down
9 changes: 1 addition & 8 deletions src/manifest.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
"version": "1.0",
"description": "牛客网 chrome 扩展",
"manifest_version": 2,
"permissions": [
"storage",
"declarativeContent",
"webRequest",
"storage",
"notifications",
"https://www.nowcoder.com/*"
],
"permissions": ["webRequest", "storage", "notifications", "https://www.nowcoder.com/*"],
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';",
"minimum_chrome_version": "68",
"background": {
Expand Down

0 comments on commit 31b7d6a

Please sign in to comment.