test
Opened this issue · 0 comments
wangmeng1991 commented
- Operating System: macOS 10.15.7
- Node Version: v14.13.1
- NPM Version: 6.14.8
- webpack Version: 5.1.0
- mini-css-extract-plugin Version: 1.0.0
Expected Behavior
no warnings printed in termina
Actual Behavior
warnings printed in termina when webpack is building in production mode
Code
// webpack.config.js
new MiniCssExtractPlugin({
filename: utils.assetsPath("css/[name].[contenthash].css"),
chunkFilename: utils.assetsPath("css/[id].[contenthash].css"),
ignoreOrder: true,
}),
<template>
<div class="error-page">
<div class="errorWarp">
<div class="image">
<img src="../../static/img/404_error.png" />
</div>
<h2 class="title">PAGE NOT FOUND</h2>
<h3 class="desc">WE COULDN'T FIND THIS PAGE</h3>
<router-link to="/" class="backBtn" tag="span">返回首页</router-link>
</div>
</div>
</template>
<style type="text/css" scoped>
.error-page {
width: 100%;
height: 100%;
text-align: center;
}
.error-page .errorWarp {
margin: 10% auto auto auto;
}
</style>
Result
When building in production mode :
WARNING in ./src/components/404.vue?vue&type=style&index=0&id=08cfdd8a&scoped=true&lang=css& 1:399-402
export 'default' (imported as 'mod') was not found in '-!../../node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-6[0].rules[0].use[0]!../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-6[0].rules[0].use[1]!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./404.vue?vue&type=style&index=0&id=08cfdd8a&scoped=true&lang=css&' (possible exports: )
@ ./src/components/404.vue 4:0-87
@ ./src/router/index.js
@ ./src/main.js 23:0-30 148:10-16
When I downgrade mini-css-extract-plugin to version 0.12.0, warning is gone.