Simplify webpack config
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const path = require('path');
|
||||
const { SRC, DIST, ASSETS, LIB } = require('./paths');
|
||||
const { SRC, DIST, LIB } = require('./paths');
|
||||
const webpack = require('webpack');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
@@ -53,32 +53,21 @@ module.exports = {
|
||||
use: ["vue-style-loader", "css-loader"],
|
||||
}, {
|
||||
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
||||
use: {
|
||||
loader: "url-loader",
|
||||
options: {
|
||||
limit: 1 * 1024,
|
||||
//name: "images/[name].[hash:7].[ext]"
|
||||
name: "images/[name].[ext]"
|
||||
}
|
||||
}
|
||||
/*type: 'asset',
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 8*1024
|
||||
maxSize: 1 * 1024
|
||||
}
|
||||
}*/
|
||||
},
|
||||
generator: {
|
||||
filename: 'images/[name][ext]'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [/*{
|
||||
from: 'geo/',
|
||||
to: path.resolve(DIST, 'geo')
|
||||
}, {
|
||||
from: path.resolve(SRC, 'images/icons'),
|
||||
to: 'images/icons'
|
||||
}, */{
|
||||
patterns: [{
|
||||
from: path.resolve(LIB, 'index.php'),
|
||||
to: 'index.php'
|
||||
},
|
||||
@@ -100,7 +89,7 @@ module.exports = {
|
||||
new VueLoaderPlugin()
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['', '.js'],
|
||||
extensions: ['.js', '.vue', '...'],
|
||||
alias: {
|
||||
"@scripts": path.resolve(SRC, "scripts")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user