问答详情
源自:-

webpack版本4.6.0,extract-text-webpack-plugin的插件不能用了,用@next也不行,现在用mini-css-extract-plugin,还是报错

config.output.filename='[name].[chunkhash:8].js'

    config.module.rules.push({

        test:/\.styl/,

        use:[

            MiniCssExtractPlugin.loader,

            "css-loader",

            "postcss-loader",

            "stylus-loader"

        ]

    })

    config.plugins.push(

        new MiniCssExtractPlugin({

          // Options similar to the same options in webpackOptions.output

          // both options are optional

          filename: "[name].css",

          chunkFilename: "[id].css"

        })

    )

https://img1.mukewang.com/5ae429bb0001246b05660391.jpg


用的是命令: npm run prod

提问者:扶搏森3119434 2018-04-28 16:00

个回答

  • 扶搏森3119434
    2018-04-28 22:51:59


    https://github.com/fridaydream/vue-todo-example/tree/master