Skip to content

Commit 71da72e

Browse files
committed
change webpack-chrome-extension-reloader to wcer
1 parent ec5d187 commit 71da72e

File tree

19 files changed

+47
-1342
lines changed

19 files changed

+47
-1342
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $ npm run dev # or yarn dev
3131
│   ├── GenerateLocaleJsonPlugin.js # Transform locale message."js" to "json"
3232
│   └── GenerateManifestJsonPlugin.js # Transform your manifest."js" to "json"
3333
├── dist # your runtime code. generate by program.
34-
├── src # your source codes
34+
├── src # your source code
3535
│   ├── background # Background work of your extension (https://developer.chrome.com/extensions/background_pages)
3636
│   ├── content # Run in the context of web pages (https://developer.chrome.com/extensions/content_scripts)
3737
│   ├── devtools # It can add new UI panels and sidebars, interact with the inspected page, get information about network requests, and more. (https://developer.chrome.com/extensions/devtools)

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-webpack-chrome-extension-template",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "Template for quick creation of Chrome extension on Vuejs hot reloading when developing.",
55
"author": "ALiangLiang",
66
"license": "MIT",

template/build/webpack.base.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
const path = require('path')
22
const webpack = require('webpack')
3-
const ChromeExtensionReloader = require('webpack-chrome-extension-reloader')
3+
const ChromeReloadPlugin = require('wcer')
44
const CopyWebpackPlugin = require('copy-webpack-plugin')
5-
const GenerateManifestJsonPlugin = require('../plugins/GenerateManifestJsonPlugin')
5+
{{#if components.locales}}
66
const GenerateLocaleJsonPlugin = require('../plugins/GenerateLocaleJsonPlugin')
7+
{{/if}}
78
const { cssLoaders, htmlPage } = require('./tools')
89

910
let resolve = (dir) => path.join(__dirname, '..', 'src', dir)
@@ -113,15 +114,15 @@ module.exports = {
113114
{{/if}}
114115
// End customize
115116
new CopyWebpackPlugin([{ from: path.join(__dirname, '..', 'static') }]),
116-
new ChromeExtensionReloader({ port: 9090 }),
117+
new ChromeReloadPlugin({
118+
port: 9090,
119+
manifest: path.join(__dirname, '..', 'src', 'manifest.js')
120+
}),
117121
{{#if components.locales}}
118122
new GenerateLocaleJsonPlugin({
119123
_locales: path.join(__dirname, '..', 'src', '_locales')
120124
}),
121125
{{/if}}
122-
new GenerateManifestJsonPlugin({
123-
manifestPath: path.join(__dirname, '..', 'src', 'manifest.js')
124-
}),
125126
new webpack.optimize.CommonsChunkPlugin({
126127
name: 'vendor',
127128
minChunks: function (module) {

0 commit comments

Comments
 (0)