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

Deprecation warning when using posthtml #1920

Closed
gregorybolkenstijn opened this issue Aug 22, 2018 · 4 comments
Closed

Deprecation warning when using posthtml #1920

gregorybolkenstijn opened this issue Aug 22, 2018 · 4 comments

Comments

@gregorybolkenstijn
Copy link

❔ Question

When using the posthtml transforms via .posthtmlrc, I get a deprecation warning.

πŸ’» Code Sample

.posthtmlrc
using posthtml-include 1.2.0

{
  "plugins": {
    "posthtml-include": {
      "root": "./src/library/"
    }
  }
}

will throw (multiple times):

β ‹ Building...addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.

🌍 Your Environment

Software Version(s)
Parcel 1.9.7
Node 10.7.0
npm/Yarn 6.3.0 / 1.9.2
Operating System macOS 10.13.6
@bre7
Copy link
Contributor

bre7 commented Aug 23, 2018

I think it's because Parcel uses addDependencyTo for compatibility reasons, see: https://github.com/parcel-bundler/parcel/blob/master/src/transforms/posthtml.js#L41-L48
PR that added that configuration: #1355

@gregorybolkenstijn
Copy link
Author

@bre7 Does that mean it will be gone in a future release?

@DeMoorJasper
Copy link
Member

@gregorybolkenstijn it's only deprecated within webpack.
It will stay inside parcel untill it gives compatibility issues with other tools, than we will deprecate it slowly if there is an alternative to it.

@LandonSchropp
Copy link

@DeMoorJasper Is it possible to reopen this? This outputs a bunch of errors into my console every time Parcel builds my source, and it stops Parcel from repainting the console.

Server running at http://localhost:7777
β ‹ Building...addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
✨  Built in 776ms.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
β ‹ Building...addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
β ‹ Building...addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
β ‹ Building...addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
addDependencyTo is deprecated in favor of
result.messages.dependency; posthtml-loader >= v1.0.1 will
automatically add your imported files to webpack's file watcher.
✨  Built in 18ms.

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

Successfully merging a pull request may close this issue.

4 participants