webpack fonts via file-loader

This commit is contained in:
Sebastian Frank
2017-08-31 22:55:24 +02:00
parent 3357d3b1fd
commit 36cd341d44
10 changed files with 23 additions and 7 deletions

View File

@@ -16,15 +16,15 @@ if (env === 'production') {
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
plugins.push(new UglifyJsPlugin({
minimize: true,
sourceMap: true
}
minimize: true,
sourceMap: true
}
));
plugins.push(new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
'process.env': {
NODE_ENV: '"production"'
}
}
));
appName = appName + '.js';
@@ -51,6 +51,12 @@ module.exports = {
test: /\.(vue|js)$/,
loader: 'eslint-loader',
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$/,
loader: 'vue-loader'