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

webpack-mix配置 #31

Open
klren0312 opened this issue May 8, 2019 · 0 comments
Open

webpack-mix配置 #31

klren0312 opened this issue May 8, 2019 · 0 comments
Labels
Vue vue相关问题

Comments

@klren0312
Copy link
Owner

mix.js('resources/assets/vuejs/user/user.js', 'public/js');
mix.sass('resources/assets/vuejs/user/assets/theme/black.scss', 'public/css', {outputStyle: 'compressed'});
mix.sass('resources/assets/vuejs/user/assets/theme/white.scss', 'public/css', {outputStyle: 'compressed'});

// 生产环境
if (mix.inProduction()) {
  mix.version([]);
  mix.options({
    uglify: {
      parallel: true, // 加快构建速度
      sourceMap: false
    }
  });

  // 去除console.log
  mix.config.uglify.uglifyOptions = {
    compress: {
      warnings: false,
      drop_console: true,
      pure_funcs: ['console.log']
    }
  };
}
@klren0312 klren0312 added the Vue vue相关问题 label May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Vue vue相关问题
Projects
None yet
Development

No branches or pull requests

1 participant