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

After using splitChunks, skeleton dom is not injected into index.html. #92

Open
zxs-1024 opened this issue Jun 27, 2020 · 1 comment
Open

Comments

@zxs-1024
Copy link

Version

vue: v2.6.11
webpack: v4.43.0
node: v11.2.0
vue-skeleton-webpack-plugin: v1.2.2

vue.config.js

const path = require('path')
const SkeletonWebpackPlugin = require('vue-skeleton-webpack-plugin');
const skeletonRouter = require('./src/skeleton/router');

module.exports = {
  lintOnSave: false,
  configureWebpack: {
    plugins: [
      new SkeletonWebpackPlugin({
        webpackConfig: {
          entry: {
            app: path.join(__dirname, './src/skeleton'),
          },
        },
        quiet: true,
        minimize: true,
        router: skeletonRouter,
      })
    ],
    optimization: {
      splitChunks: {
        minSize: 30000,
        maxSize: 102400,
        cacheGroups: {
          common: {
            name: 'common',
            chunks: 'initial',
            minChunks: 2,
            priority: -20,
            reuseExistingChunk: true,
          },
          vendors: {
            test: /[\\/]node_modules[\\/]/,
            name: 'vendors',
            chunks: 'all',
            minChunks: 2,
            priority: -10,
            reuseExistingChunk: true,
          },
        },
      },
    },
  }
}

What is expected?

After using splitChunks, skeleton dom injected into index.html.

What is actually happening?

After using splitChunks, skeleton dom is not injected into index.html.

@zxs-1024
Copy link
Author

The discovery is the reason for using maxsize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant