小编Ale*_*nov的帖子

无法使用Webpack缩小CSS代码

Webpack版本:4.16.3

所有编译成功。
在bundle.css中编译后的代码没有缩小。
我尝试在text-webpack-plugin中使用最小化:true,但是它不起作用。

为了进行编译,我在命令行中使用命令:我的工作目录中的webpack

我究竟做错了什么?

我的wepback配置:

'use strict'

const webpack = require("webpack");
const ExtractTextPlugin = require('extract-text-webpack-plugin')

module.exports = {
  context: __dirname,
  mode: 'production',
  entry: __dirname + "/js/init.js",
  output: {
    path: __dirname + "/dist",
    filename: "bundle.js"
  },
  plugins: [
    new webpack.ProvidePlugin({
      $: "jquery",
      jQuery: "jquery",
      noUiSlider: 'nouislider',
      Vue: 'vue'
    }),
    new ExtractTextPlugin("bundle.css")
  ],
  module: {
    'rules': [
      {
        test: /\.css$/,
        use: ExtractTextPlugin.extract({
          fallback: "style-loader",
          use: {
            loader: "css-loader",
            options: {
              minimize: true
            }
          }
        })
      }
      , …
Run Code Online (Sandbox Code Playgroud)

javascript css minify webpack webpack-4

6
推荐指数
2
解决办法
1万
查看次数

How to read nginx access.log?

My server is compiled on a docker.

The Nginx container is built from a standard assembly.

I want to read the access.log nginx but I see this kind of content:

172.68.244.173 - - [24/Aug/2018:12:14:04 +0000] "\x16\x03\x01\x00\xEC\x01\x00\x00\xE8\x03\x03\x8A?\xB5\xFA\x17?\x8A\x9B\x04T>yK\x1A\xF6\x8F_\xBE:.\xF9\xED\xF6\xEE\xFCM\xD0\x88Ji\xDD\xF5 \xFF\xBDm\x98@mo:U\xA6\x0E\xB7\x93\x02sm`\xC6\xD1s0vV*\x88y\xDA&\xFCfZ\xF4\x00\x16\x13\x01\x13\x02\x13\x03\xC0+\xC0/\xC0\x13\x00\x9C\x00/\xC0(\x005\x00" 400 173 "-" "-"
Run Code Online (Sandbox Code Playgroud)

How to read such a log? What does this mean?

logging nginx

4
推荐指数
1
解决办法
6224
查看次数

标签 统计

css ×1

javascript ×1

logging ×1

minify ×1

nginx ×1

webpack ×1

webpack-4 ×1