Skip to content

Unable to use plugin #4

@eavichay

Description

@eavichay

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions