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

importing the sdk causes a warning in webpack #208

Closed
jooohn opened this issue May 9, 2019 · 6 comments
Closed

importing the sdk causes a warning in webpack #208

jooohn opened this issue May 9, 2019 · 6 comments

Comments

@jooohn
Copy link

jooohn commented May 9, 2019

Maybe because of this parcel's issue (parcel-bundler/parcel#2883), I've run into the same problem (https://github.com/jooohn/reproduce-contentful-ui-extensions-error).

I believe it's not originally this sdk's problem, but I want to know when the problem is fixed anyway!

@suevalov
Copy link
Contributor

suevalov commented May 9, 2019

@jooohn Thanks for creating a repo with a reproduced issue!

What problems does this warning cause? From what I see at webpack/webpack#196, it a long-running issue with Webpack and I'm not sure if we should act on it.

@jooohn
Copy link
Author

jooohn commented May 9, 2019

According to this issue, a library built with percel causes the warning when the built js is bundled with webpack by library users.
parcel-bundler/parcel#2883 (comment)

I think it's an issue of either webpack or parcel, so possible approaches would be like this:

  1. Wait for webpack fixes the issue.
  2. Wait for parcel to fix the issue, and then build this SDK with the new version of parcel.
  3. Build this SDK without parcel.

@andersrydman
Copy link

Hi,
I'm encountering the same issue when importing this into a create-react-app project. Are you aware of any way to fix it?

@jelz jelz removed their assignment Dec 19, 2019
@fredski02
Copy link

I get the same thing using webpack and vue.

App.vue

import { init as initContentfulExtension } from 'contentful-ui-extensions-sdk'

export default {
  data () {
    return {
      extension: null
    }
  },
  created () {
    initContentfulExtension((extension) => {
      this.extension = extension
      this.extension.window.startAutoResizer()
    })
  }
}

@kamsar
Copy link

kamsar commented Aug 25, 2020

This causes build failures on Netlify with apps created using the create-contentful-app utility, because it uses create-react-app (webpack) that treats warnings as errors during CI builds; contentful/create-contentful-app#15

@Jwhiles
Copy link
Contributor

Jwhiles commented Dec 15, 2020

I believe this issue should be fixed in newer versions of the SDK, as we're no longer using parcel in this repo. Please feel free to open a new issue if this is still causing you problems.

@Jwhiles Jwhiles closed this as completed Dec 15, 2020
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

7 participants