webpack fonts via file-loader
This commit is contained in:
9
package-lock.json
generated
9
package-lock.json
generated
@@ -2633,6 +2633,15 @@
|
|||||||
"object-assign": "4.1.1"
|
"object-assign": "4.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"file-loader": {
|
||||||
|
"version": "0.11.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.11.2.tgz",
|
||||||
|
"integrity": "sha512-N+uhF3mswIFeziHQjGScJ/yHXYt3DiLBeC+9vWW+WjUBiClMSOlV1YrXQi+7KM2aA3Rn4Bybgv+uXFQbfkzpvg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"loader-utils": "1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"filename-regex": {
|
"filename-regex": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"eslint": "^4.5.0",
|
"eslint": "^4.5.0",
|
||||||
"eslint-loader": "^1.9.0",
|
"eslint-loader": "^1.9.0",
|
||||||
"eslint-plugin-vue": "^3.12.0",
|
"eslint-plugin-vue": "^3.12.0",
|
||||||
|
"file-loader": "^0.11.2",
|
||||||
"less": "^2.7.2",
|
"less": "^2.7.2",
|
||||||
"less-loader": "^4.0.5",
|
"less-loader": "^4.0.5",
|
||||||
"vue-hot-reload-api": "^2.1.0",
|
"vue-hot-reload-api": "^2.1.0",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,6 +1,6 @@
|
|||||||
@import "mixins";
|
@import "mixins";
|
||||||
|
|
||||||
@iconfont_path: "~/assets/fonts/";
|
@iconfont_path: "fonts/";
|
||||||
@iconfont_version: 4;
|
@iconfont_version: 4;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,15 @@ if (env === 'production') {
|
|||||||
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
|
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
|
||||||
|
|
||||||
plugins.push(new UglifyJsPlugin({
|
plugins.push(new UglifyJsPlugin({
|
||||||
minimize: true,
|
minimize: true,
|
||||||
sourceMap: true
|
sourceMap: true
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
plugins.push(new webpack.DefinePlugin({
|
plugins.push(new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
NODE_ENV: '"production"'
|
NODE_ENV: '"production"'
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
appName = appName + '.js';
|
appName = appName + '.js';
|
||||||
@@ -51,6 +51,12 @@ module.exports = {
|
|||||||
test: /\.(vue|js)$/,
|
test: /\.(vue|js)$/,
|
||||||
loader: 'eslint-loader',
|
loader: 'eslint-loader',
|
||||||
exclude: /node_modules/
|
exclude: /node_modules/
|
||||||
|
}, {
|
||||||
|
test: /\.(jpe?g|png|gif|woff|woff2|ttf|svg|eot)(\?.*)?$/i,
|
||||||
|
loader: 'file-loader',
|
||||||
|
options: {
|
||||||
|
name: '[name].[sha512:hash:base64:7].[ext]'
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
test: /\.vue$/,
|
test: /\.vue$/,
|
||||||
loader: 'vue-loader'
|
loader: 'vue-loader'
|
||||||
|
|||||||
Reference in New Issue
Block a user