Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Polymer 3 issue #3332

Open just4anu opened 5 years ago

just4anu commented 5 years ago

import { PolymerElement, html } from '@polymer/polymer'; import template from 'xxx.html'; import { DisplayFormatBehavior } from ('../behaviors/display-format-behavior-component.js'); import { ErrorHandlingBehavior } from ('../behaviors/error-handling-behavior-component.js'); import { ProgressHandlingBehavior } from ('../behaviors/progress-handling-behavior-component.js'); import { ValidationErrorsBehavior } from ('../behaviors/validation-errors-behavior-component.js');

class XXX extends PolymerElement,DisplayFormatBehavior,ErrorHandlingBehavior,ProgressHandlingBehavior,ValidationErrorsBehavior { }

This code is not working. Uncaught syntax error on polymer import --> first line. My project was initially developed with polymer 1 and tried automatic upgrade using Modulizer out and it didnt work. Installed latest polymer client. So, manually wrote a js component for my html file and linked using the template import. Please help.

hellokatili commented 5 years ago

Did you try to change your first import to this?

import {html, PolymerElement} from '@polymer/polymer/polymer-element.js';
web-padawan commented 5 years ago

import template from 'xxx.html';

Note, this doesn't work with Polymer CLI out of the box. Only ES modules can be imported by browser.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.