opened
vdegenne
username_0
The reason I get this message is obvious : **I am not using the proper plugins to parse this babel/typescript feature into final served state**.
However I am not using a direct parser or a compilation program myself. Instead I am using the `serve` command of the `polymer-cli` package (`1.8.0`). This command provides a compilation on-the-fly as modules are requested from the front-end. I searched a way to bind one of the module to the `serve` command but I couldn't find one.
Is it a feature you guys are going to implement in the future ?
lit-element @property syntax invalid
issue
created
ronnyroeller
username_1
+1
comment
created
Pickachu
username_2
tried manually adding plugin-proposal-decorators to the plugin array with no success, would like further directions or know if this will be implemented in the future.

Changes:

```javascript

const babelTransformEs2018 = [
    require('@babel/plugin-proposal-object-rest-spread'),
    require('@babel/plugin-proposal-async-generator-functions'),
    require('@babel/plugin-proposal-decorators'),
    require('@babel/plugin-proposal-class-properties'),
];

```

Also it is needed to update the babylon parser configs:

```javascript
    babylon.parse(js, {
                // TODO(aomarks) Remove any when typings are updated for babylon 7.
                // tslint:disable-next-line: no-any
                sourceType: transformModulesToAmd === 'auto' ? 'unambiguous' :
                    'module',
                plugins: [
                    'decorators', // here
                    'classProperties', // here
                    'asyncGenerators',
                    'dynamicImport',
                    // tslint:disable-next-line: no-any
                    'importMeta',
                    'objectRestSpread',
                ],
            });
```

Input:

```javascript
import { LitElement, html, property } from "../../../node_modules/@polymer/lit-element/lit-element.js";

class Domo extends LitElement {
   @property({type : String})  prop1 = 'Hello World';
}

window.customElements.define('domo', Domo);
```

Output:

```javascript
import { LitElement, html, property } from "../../../node_modules/@polymer/lit-element/lit-element.js";

class Domo extends LitElement {
  @
  prop1 = 'Hello World';
}

window.customElements.define('domo', Domo);
```
comment