question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecation warning

See original GitHub issue

My config:

postcss( {
        modules: false,  
        extract: true,  
        extensions: [ ".css" ],  
        minimize: true,  
        sourceMap: true  
      })

This emits deprecation warning from rollup:

(!) A plugin is directly adding properties to the bundle object in the “generateBundle” hook. This is deprecated and will be removed in a future Rollup version, please use “this.emitFile” instead.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:12

github_iconTop GitHub Comments

2reactions
SASUKE40commented, Apr 18, 2020

Please use #197 solution or other fix, this warning in watch mode looks extremely bad, it is printed on every rebuild:

image

🙏

The rollup v2 adaptation is still work in progress and will be released soon to resolve this warning.

2reactions
MrJohzcommented, Apr 8, 2020

Aha, thanks! To fix that, would some sort of migration path make sense? E.g:

extract: true -> use this.emitFile and avoid the deprecation warning extract:'string' -> use the existing bundle[filename] assignment.

Alternatively, a new configuration key could be given: emit (which is just a boolean value). It would be an error to configure both emit and extract at the same time.

I think adding the new configuration key is the only way to avoid any breaking changes, but it also adds more configuration options, which is also difficult. I’m happy to put together a pull request for any of these options - which do you think makes the most sense?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What does DeprecationWarning mean when running Python
I ran a Python program and got a DeprecationWarning , like: D:\programs\anaconda2\ ...
Read more >
Dealing with Deprecation Warnings - Java Cookbook [Book]
As a general rule, when something has been deprecated, you should not use it in any new code and, when maintaining code, strive...
Read more >
warnings — Warning control — Python 3.11.1 documentation
DeprecationWarning. Base category for warnings about deprecated features when those warnings are intended for other Python developers (ignored by default, ...
Read more >
Deprecating code in a Rails application
Inside the method you want to deprecate, use ActiveSupport::Deprecation.warn , with a string to describe what's been deprecated, and how ...
Read more >
Python deprecation - DEV Community ‍ ‍
To let the warning refer to the caller, so you know exactly where you use deprecated code, you have to set stacklevel=2 ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found