This is an example project demonstrating how you can build a frontend part of the JavaScript application using Vaadin components and Vaadin.Router library, and leverage the benefits of the modern tools.
The application uses ES modules for development, and Webpack as a module bundler. The optimizations like code splitting, minifying JavaScript and HTML (inside of the template string literals) are used to reduce production bundle size.
Note: the Vaadin.Router
is a Release Candidate and the API is not expected to change,
but we appreciate any feedback. The ES modules versions of Vaadin components, built
using Polymer 3, are currently in beta. Stay tuned!
npm i
Start webpack-dev-server
on localhost http://127.0.0.1:3000
:
npm run dev
npm run lint
Run the production build:
npm run build
Serve the built output on localhost http://127.0.0.1:8000
:
npm start
- Using
import.meta
suggested by Polymer docs is not supported, see webpack/webpack#6719 @babel/plugin-transform-classes
should be pinned to 7.0.0-beta.35, see Polymer/tools#398