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

Unable to use plugin #4

Open
eavichay opened this issue Oct 2, 2017 · 3 comments
Open

Unable to use plugin #4

eavichay opened this issue Oct 2, 2017 · 3 comments

Comments

@eavichay
Copy link

eavichay commented Oct 2, 2017

I get the following error

ERROR in ./src/index.js
Module build failed: TypeError: babel.Transformer is not a constructor
    at module.exports (/Users/eavichay/dev/slim-webpack/node_modules/babel-plugin-jsx/lib/babel-jsx.js:17:10)

.babelrc

{
    "presets": ["env"],
    "plugins": ["transform-decorators-legacy", "jsx-to-html/babel-plugin"]
}

my app code

Slim.tag('test-app',
class X extends Slim {
    onBeforeCreated() {
        this.myValue = 3
    }
    get template() {
        return <div>Hello {this.myValue}</div>
    }
})

package.json

  "dependencies": {
    "babel-cli": "^6.26.0",
    "babel-loader": "^7.1.2",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-env": "^1.6.0",
    "clean-webpack-plugin": "^0.1.17",
    "html-webpack-plugin": "^2.30.1",
    "jsx-to-html": "^1.1.0",
    "slim-js": "*",
    "webpack": "^3.6.0",
    "webpack-dev-server": "^2.9.1"
  }

Much appreciated if you help me debug this

@skywickenden
Copy link

also have this bug after upgrading babel. Did you resolve it?

@eavichay
Copy link
Author

@skywickenden Sorry, still not working

@skywickenden
Copy link

Thanks for getting back to me. I ended refactoring it out. I only used it on two files so I just reverted to using a string.

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

2 participants