mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							54 lines
						
					
					
						
							1.2 KiB
						
					
					
				
			
		
		
	
	
							54 lines
						
					
					
						
							1.2 KiB
						
					
					
				const { generateWebpackConfig, merge } = require('shakapacker')
 | 
						|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
 | 
						|
const { VueLoaderPlugin } = require('vue-loader')
 | 
						|
 | 
						|
const configs = generateWebpackConfig({
 | 
						|
  resolve: {
 | 
						|
    extensions: ['.css', '.scss', '.vue']
 | 
						|
  },
 | 
						|
  performance: {
 | 
						|
    maxEntrypointSize: 0
 | 
						|
  },
 | 
						|
  optimization: {
 | 
						|
    runtimeChunk: false,
 | 
						|
    splitChunks: {
 | 
						|
      chunks (chunk) {
 | 
						|
        return chunk.name !== 'sentry'
 | 
						|
      },
 | 
						|
      cacheGroups: {
 | 
						|
        default: false,
 | 
						|
        applicationVendors: {
 | 
						|
          test: /\/node_modules\//,
 | 
						|
          chunks: chunk => chunk.name === 'application'
 | 
						|
        },
 | 
						|
        formVendors: {
 | 
						|
          test: /\/node_modules\//,
 | 
						|
          chunks: chunk => chunk.name === 'form'
 | 
						|
        }
 | 
						|
      }
 | 
						|
    }
 | 
						|
  },
 | 
						|
  plugins: [
 | 
						|
    process.env.BUNDLE_ANALYZE && new BundleAnalyzerPlugin(),
 | 
						|
    new VueLoaderPlugin()
 | 
						|
  ].filter(Boolean)
 | 
						|
})
 | 
						|
 | 
						|
configs.module = merge({
 | 
						|
  rules: [
 | 
						|
    {
 | 
						|
      test: /\.vue$/,
 | 
						|
      use: [{
 | 
						|
        loader: 'vue-loader',
 | 
						|
        options: {
 | 
						|
          compilerOptions: {
 | 
						|
            isCustomElement: tag => tag.includes('-')
 | 
						|
          }
 | 
						|
        }
 | 
						|
      }]
 | 
						|
    }
 | 
						|
  ]
 | 
						|
}, configs.module)
 | 
						|
 | 
						|
module.exports = configs
 |