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

Disable in CI #109

Open
Diokuz opened this issue Jun 16, 2022 · 6 comments
Open

Disable in CI #109

Diokuz opened this issue Jun 16, 2022 · 6 comments

Comments

@Diokuz
Copy link

Diokuz commented Jun 16, 2022

Is that possible to disable webpackbar in CI with process.env?

Снимок экрана 2022-06-16 в 09 50 49

@brunojppb
Copy link

Yes. it's possible.
During CI, make sure that you don't use the plugin based on an environment variable. Something like this:

const webpack = require('webpack');
const WebpackBar = require('webpackbar');

module.exports = {
  context: path.resolve(__dirname),
  devtool: 'source-map',
  entry: './entry.js',
  output: {
    filename: './output.js',
    path: path.resolve(__dirname)
  },
  plugins: [
    ...(process.env.CI === '1' ? [] : [ new WebpackBar() ])
  ]
};

@joacub
Copy link

joacub commented Nov 22, 2022

Is there another solution to do not have that many lines without disabled it ?

@brunojppb
Copy link

brunojppb commented Nov 22, 2022

Is there another solution to do not have that many lines without disabled it ?

The only line that you need is this one:

    ...(process.env.CI === '1' ? [] : [ new WebpackBar() ])

Everything else is part of your Webpack config as usual. I've added it there to showcase how it would look like.
This is how you can toggle the feature in CI.

@joacub
Copy link

joacub commented Nov 26, 2022

Yeah that disable the utility, and we don’t want to disable we want to have that working as usual but not generating that many lines. Do you know how to tell the ci to reuse the lines effectively?

@brunojppb
Copy link

Unfortunately, I don’t see the point of having that plug-in enabled in CI. This is a plug-in for feedback mostly during development.

your CI output is just a stream of logs that don’t behave as exactly as your local terminal during development.

@joacub
Copy link

joacub commented Dec 9, 2022

Unfortunately, I don’t see the point of having that plug-in enabled in CI. This is a plug-in for feedback mostly during development.

your CI output is just a stream of logs that don’t behave as exactly as your local terminal during development.

We follow the ci integrations in productions sometimes and we want to see the progress of the build that’s why. I try many things but no one worked

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

3 participants