Commit bf7cde75 authored by 沈良进's avatar 沈良进

merge

parent c55c1205
...@@ -18,8 +18,7 @@ exports.cssLoaders = function (options) { ...@@ -18,8 +18,7 @@ exports.cssLoaders = function (options) {
const cssLoader = { const cssLoader = {
loader: 'css-loader', loader: 'css-loader',
options: { options: {
sourceMap: options.sourceMap, sourceMap: options.sourceMap
url: false
} }
} }
......
...@@ -55,38 +55,37 @@ module.exports = { ...@@ -55,38 +55,37 @@ module.exports = {
use: ["thread-loader",'babel-loader'], use: ["thread-loader",'babel-loader'],
exclude: /NIM_Web_SDK_v5.0.0.js/, exclude: /NIM_Web_SDK_v5.0.0.js/,
include: [resolve('src'), resolve('test')] include: [resolve('src'), resolve('test')]
}, },{
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]') filename: utils.assetsPath('img/[name].[hash:7].[ext]')
} },
}, },
{ {
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]') filename: utils.assetsPath('media/[name].[hash:7].[ext]')
} },
}, },
{ {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') filename: utils.assetsPath('fonts/[name].[hash:7].[ext]')
} },
}, },
{ {
test: /\.(mp3)(\?.*)?$/, test: /\.(mp3)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
name: utils.assetsPath('assets/[name].[hash:7].[ext]') filename: utils.assetsPath('assets/[name].[hash:7].[ext]')
} },
} }
] ]
}, },
......
...@@ -81,34 +81,31 @@ resolve: { ...@@ -81,34 +81,31 @@ resolve: {
}, },
{ {
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
limit: 10000, filename: utils.assetsPath('img/[name].[hash:10][ext]')
name: utils.assetsPath('img/[name].[hash:7].[ext]') },
}
}, },
{ {
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
limit: 10000, filename: utils.assetsPath('media/[name].[hash:7].[ext]')
name: utils.assetsPath('media/[name].[hash:7].[ext]') },
}
}, },
{ {
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
limit: 10000, filename: utils.assetsPath('fonts/[name].[hash:7].[ext]')
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') },
}
}, },
{ {
test: /\.(mp3)(\?.*)?$/, test: /\.(mp3)(\?.*)?$/,
loader: 'url-loader', type: "asset",
options: { generator: {
name: utils.assetsPath('assets/[name].[hash:7].[ext]') filename: utils.assetsPath('assets/[name].[hash:7].[ext]')
} },
} }
] ]
}, },
...@@ -160,11 +157,10 @@ resolve: { ...@@ -160,11 +157,10 @@ resolve: {
{ {
from: path.resolve(__dirname, '../static'), from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory, to: config.dev.assetsSubDirectory,
globOptions: {
ignore: ['.*']
},
}, },
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
}
]}) ]})
] ]
} }
......
...@@ -11,6 +11,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin') ...@@ -11,6 +11,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
// const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') // const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
// const UglifyJsPlugin = require('uglifyjs-webpack-plugin') // const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
// const {VueLoaderPlugin} = require('vue-loader')
const env = require('../config/prod.env') const env = require('../config/prod.env')
const version = new Date().getTime(); const version = new Date().getTime();
...@@ -41,6 +42,7 @@ const webpackConfig = merge(baseWebpackConfig, { ...@@ -41,6 +42,7 @@ const webpackConfig = merge(baseWebpackConfig, {
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env': env 'process.env': env
}), }),
// new VueLoaderPlugin(),
// new UglifyJsPlugin({ // new UglifyJsPlugin({
// uglifyOptions: { // uglifyOptions: {
// compress: { // compress: {
...@@ -114,7 +116,10 @@ const webpackConfig = merge(baseWebpackConfig, { ...@@ -114,7 +116,10 @@ const webpackConfig = merge(baseWebpackConfig, {
new CopyWebpackPlugin({patterns:[ new CopyWebpackPlugin({patterns:[
{ {
from: path.resolve(__dirname, '../static'), from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory to: config.dev.assetsSubDirectory,
globOptions: {
ignore: ['.*']
},
} }
]}) ]})
] ]
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
"timers-browserify": "^2.0.12", "timers-browserify": "^2.0.12",
"url-loader": "^4.1.1", "url-loader": "^4.1.1",
"vue-easytable": "^1.7.2", "vue-easytable": "^1.7.2",
"vue-loader": "^14.2.3", "vue-loader": "^14.2.4",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"vue-style-loader": "^4.1.3", "vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.5.2", "vue-template-compiler": "^2.5.2",
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
@import "//at.alicdn.com/t/font_635492_wcd7pw1105.css"; @import "//at.alicdn.com/t/font_635492_wcd7pw1105.css";
@import "./assets/css/Semibold.css"; @import "./assets/css/Semibold.css";
@import "./assets/css/global/config.css"; @import "./assets/css/global/config.css";
@import "./assets/css/fileIcon.css"; /* @import "./assets/css/fileIcon.css"; */
/* html,body{height: 100%; min-width: 1366px; } */ /* html,body{height: 100%; min-width: 1366px; } */
html, html,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment