Skip to content
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

[Bug Report] Tree shaking warnings when building #9916

Closed
JohnMica opened this issue Dec 9, 2019 · 1 comment
Closed

[Bug Report] Tree shaking warnings when building #9916

JohnMica opened this issue Dec 9, 2019 · 1 comment
Labels
duplicate The issue has already been reported

Comments

@JohnMica
Copy link

JohnMica commented Dec 9, 2019

Environment

Vuetify Version: 2.1.13
Vue Version: 2.6.10
Browsers: Chrome 78.0.3904.108
OS: Mac OS 10.14.5

Steps to reproduce

Using nuxt/vuetify with vuetify 2.1.13

nuxt.config has

head: {},

  http2: {
    push: false,
    pushAssets: (req, res, publicPath, preloadFiles) =>
      preloadFiles
        .filter(f => f.asType === 'script' && f.file === 'runtime.js')
        .map(f => `<${publicPath}${f.file}>; rel=preload; as=${f.asType}`)
  },

...
modules: ['@nuxtjs/axios', '@nuxtjs/vuetify'],
buildModules: [],
  vuetify: {
    defaultAssets: {
      font: {
        family: 'Roboto'
      },
      icons: 'md'
    },
    icons: {
      iconfont: 'md'
    },
    customVariables: ['@/assets/scss/variables.scss'],
    treeShake: process.NODE_ENV !== 'production' ? false : true
  },
 build: {
    analyze: process.NODE_ENV !== 'production',
...
    transpile: [/^vuetify/],
    extractCSS: true,
    sourceMap: process.NODE_ENV === 'production' ? false : true,
   cssSourceMap: process.NODE_ENV === 'production' ? false : true,
  ...
      nodeEnv: 'production',
      removeAvailableModules: true,
      mergeDuplicateChunks: true,
      chunkIds: 'named',
      splitChunks: {
        cacheGroups: {
          styles: {
            name: 'styles',
            test: /\.(css|vue)$/,
            chunks: 'all',
            enforce: true
          }
        }
      }
    },
  ...
...
  }

Expected Behavior

expected no warnings on build for tree shake

Actual Behavior

warnings such as

WARNING in chunk 11 [extract-css-chunks-webpack-plugin]
Conflicting order between:
 * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VSlider/VSlider.sass
 * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VItemGroup/VItemGroup.sass

Reproduction Link

https://codepen.io

Other comments

not sure what is going on here but perhaps a bug in vuetify tree shake functionality or perhaps in my code ?

no reproduction link as the project is not public yet

@ghost ghost added the S: triage label Dec 9, 2019
@KaelWD
Copy link
Member

KaelWD commented Dec 9, 2019

Duplicate of #5271

@KaelWD KaelWD marked this as a duplicate of #5271 Dec 9, 2019
@KaelWD KaelWD closed this as completed Dec 9, 2019
@KaelWD KaelWD added duplicate The issue has already been reported and removed S: triage labels Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate The issue has already been reported
Projects
None yet
Development

No branches or pull requests

2 participants