Skip to content

Commit 4b3f412

Browse files
张柯雨张柯雨
authored andcommitted
[feature] change font packing mode
1 parent 419ee2a commit 4b3f412

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-privilege-menu",
33
"description": "Automatically generate routes and menu by given privilege",
4-
"version": "1.0.11",
4+
"version": "1.0.12",
55
"author": "zhangkeyu",
66
"license": "MIT",
77
"private": false,

webpack.config.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
// entry: './example/main.js',
77
output: {
88
path: path.resolve(__dirname, './dist'),
9-
publicPath: '/dist/',
9+
publicPath: './dist/',
1010
filename: 'vue-privilege-menu.js',
1111
library: 'vuePrivilegeMenu',
1212
libraryTarget: 'umd',
@@ -31,20 +31,10 @@ module.exports = {
3131
exclude: /node_modules/
3232
},
3333
{
34-
test: /\.(png|jpg|gif|svg)$/,
35-
loader: 'file-loader',
36-
options: {
37-
name: '[name].[ext]?[hash]'
38-
}
39-
},
40-
{
41-
test: /\.(woff|woff2|ttf|eot|svg)$/,
34+
test: /\.(woff|woff2|ttf|eot|png|jpg|gif|svg)$/,
4235
loader: 'url-loader',
4336
options: {
4437
name: "[name]-[hash:5].[ext]",
45-
limit: 5000, // fonts file size <= 5KB, use 'base64'; else, output svg file
46-
publicPath: "/dist/fonts/",
47-
outputPath: "fonts/"
4838
}
4939
}
5040
]

0 commit comments

Comments
 (0)