Skip to content

The packaged CSS file does not contain non-routing components #4341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SoldierAb opened this issue Jul 23, 2019 · 7 comments
Closed

The packaged CSS file does not contain non-routing components #4341

SoldierAb opened this issue Jul 23, 2019 · 7 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@SoldierAb
Copy link

Version

3.9.2

Environment info

//--- vue.config.js
const path = require('path')
const ExtractTextPlugin = require('extract-text-webpack-plugin')

module.exports = {

  publicPath: '/',

  configureWebpack: {
    module: {
      rules: [
        {
          test: /\.scss$/,
          use: ExtractTextPlugin.extract({
            fallback: "style-loader",
            use: [
              "css-loader",
              "sass-loader",
              {
                loader: 'sass-resources-loader',
                options: {
                  resources: path.resolve(__dirname, `./src/theme/${process.env.VUE_APP_THEME}.scss`)  //主题皮肤文件全局注入
                }
              }
            ]
          })
        },
      ]
    },
    plugins: [
      new ExtractTextPlugin({
        filename: `theme/${process.env.VUE_APP_THEME}.css`,
        allChunks: true      
      }),
    ],
   }
}



//App.vue  
<template>
  <div>
      <top-nav></top-nav>
      <router-view></router-view>
  </div>
</template>

<style lang="scss">

</style>


// ---------------------

Steps to reproduce

npm run build

What is expected?

The packaged CSS file contain non-routing components

What is actually happening?

The packaged CSS file does not contain non-routing components(App, TopNav)


@haoqunjiang
Copy link
Member

What do you mean by "non-routing components"?
Please provide a runnable reproduction.

@haoqunjiang haoqunjiang added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Jul 23, 2019
@SoldierAb
Copy link
Author

SoldierAb commented Jul 23, 2019 via email

@haoqunjiang
Copy link
Member

Please do provide a runnable reproduction. I've no idea how you use the App.vue so I can't give any suggestions.

@vue-bot
Copy link

vue-bot commented Aug 2, 2019

Hello!
This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues requiring feedback after 20 days of inactivity. It’s been at least 10 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. (A maintainer can also add the label not stale to keep this issue open.)

Thanks for being a part of the Vue community! 💪💚️

@Mighty683
Copy link

If you lazy load component CSS files are splited with JS files I think there should be option to extract single CSS file.

@vue-bot
Copy link

vue-bot commented Aug 17, 2019

Hello!
This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues requiring feedback after 20 days of inactivity. It’s been at least 10 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. (A maintainer can also add the label not stale to keep this issue open.)

Thanks for being a part of the Vue community! 💪💚️

@LinusBorg
Copy link
Member

This has been without a reproduction long enough. I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

5 participants