Skip to content

Commit 8084836

Browse files
committed
chore(example): update "minimal" example
1 parent 3646c77 commit 8084836

File tree

3 files changed

+445
-309
lines changed

3 files changed

+445
-309
lines changed

examples/minimal/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"vue-loader": "^15.4.2",
3737
"vue-template-compiler": "^2.6.10",
3838
"webpack": "^4.20.2",
39-
"webpack-chrome-extension-reloader": "^0.8.3",
40-
"webpack-cli": "^3.1.2"
39+
"webpack-cli": "^3.1.2",
40+
"webpack-extension-reloader": "^1.1.0"
4141
}
4242
}

examples/minimal/webpack.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const webpack = require('webpack');
22
const ejs = require('ejs');
33
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
44
const CopyWebpackPlugin = require('copy-webpack-plugin');
5-
const ChromeExtensionReloader = require('webpack-chrome-extension-reloader');
5+
const ExtensionReloader = require('webpack-extension-reloader');
66
const { VueLoaderPlugin } = require('vue-loader');
77
const { version } = require('./package.json');
88

@@ -50,6 +50,13 @@ const config = {
5050
name: '[name].[ext]?emitFile=false',
5151
},
5252
},
53+
{
54+
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
55+
loader: 'file-loader',
56+
options: {
57+
name: '[name].[ext]?emitFile=false',
58+
},
59+
},
5360
],
5461
},
5562
plugins: [
@@ -93,7 +100,9 @@ if (config.mode === 'production') {
93100

94101
if (process.env.HMR === 'true') {
95102
config.plugins = (config.plugins || []).concat([
96-
new ChromeExtensionReloader(),
103+
new ExtensionReloader({
104+
manifest: __dirname + '/src/manifest.json',
105+
}),
97106
]);
98107
}
99108

0 commit comments

Comments
 (0)