Commit fbc42764 by 冒粤蓉

add config again and again

1 parent f945c0f6
...@@ -9,7 +9,7 @@ const dev = process.env.NODE_ENV === "development"; ...@@ -9,7 +9,7 @@ const dev = process.env.NODE_ENV === "development";
const getPublicPath = dev ? `//localhost:${port}` : 'http://eshield-perm.test.glsx.com.cn'; const getPublicPath = dev ? `//localhost:${port}` : 'http://eshield-perm.test.glsx.com.cn';
module.exports = { module.exports = {
publicPath: dev ? `//localhost:${port}` : "/", // publicPath: dev ? `//localhost:${port}` : "/",
outputDir: "dist", outputDir: "dist",
assetsDir: "static", assetsDir: "static",
filenameHashing: true, filenameHashing: true,
...@@ -35,20 +35,16 @@ module.exports = { ...@@ -35,20 +35,16 @@ module.exports = {
.set('config', resolve('src/config')) .set('config', resolve('src/config'))
.set('utils', resolve('src/utils')) .set('utils', resolve('src/utils'))
.set('services', resolve('src/services')) .set('services', resolve('src/services'))
config.module.rule('fonts') const fontRule = config.module.rule('fonts');
.use('url-loader') fontRule.uses.clear();
.loader('url-loader') fontRule
.use('file-loader')
.loader('file-loader')
.options({ .options({
limit: 4096, // 小于4kb将会被打包成 base64 name: 'fonts/[name].[hash:8].[ext]',
fallback: { publicPath: getPublicPath
loader: 'file-loader',
options: {
name: 'fonts/[name].[hash:8].[ext]',
getPublicPath
}
}
}) })
.end(); .end()
}, },
configureWebpack: { configureWebpack: {
output: { output: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!