Home Start Get started Quick tour of Polymer Install Polymer 2.x Build an element 1. Get set up 2. Add local DOM 3. Data binding & properties 4. React to input 5. Theming with custom properties Build an app 1. Get set up 2. Create a new page 3. Add some elements 4. Deploy Polymer Feature overview About this release What's new in 2.0 Upgrade guide Hybrid elements Release notes Custom elements Custom element concepts Define an element Declare properties Shadow DOM & styling Shadow DOM concepts DOM templating Style shadow DOM Custom CSS properties Events Handle and fire events Gesture events Data system Data system concepts Work with object and array data Observers and computed properties Data binding Helper elements Browser support Overview Polyfills ES6 Tools Tools overview Polymer CLI Document your elements Test your elements Web services polymer.json specification Node support Resources Glossary API Reference API Reference Global settings App Toolbox What's in the box? Using the Toolbox App templates Responsive app layout Routing Localization App storage Service worker Deploy Build for production Serve your app The PRPL pattern Case study Shop News Blog Community What's in the box?
Using the Toolbox
App templates Responsive app layout Routing Localization App storage Service worker
Deploy
Build for production Serve your app The PRPL pattern
Case study
Shop News

You can serve an App Toolbox app using any server technology you want. The Polymer CLI build process supports fast-loading applications that can take advantage of the latest web technologies.

The default output of the polymer build command is an unbundled build designed for server/browser combinations that support HTTP/2 and HTTP/2 server push to deliver the resources the browser needs for a fast first paint while optimizing caching.

See the documentation on the PRPL pattern for more information.

For server and browser combinations that don't support server push, you can generate a bundled build designed to minimize the number of round-trips required to get the application running.

Create a bundled build with the --bundled flag:

polymer build --bundle

If you need to perform dynamic serving (serving different content to users with different browsers), multiple builds are an option. You can generate multiple builds by configuring them in your polymer.json file.

If you have multiple builds, your server logic must deliver the appropriate build for each browser, usually by examining the user-agent string sent by the browser.

You may need to perform dynamic serving if:

  • You want to serve a bundled build to some users, and an unbundled build to others.
  • You want to serve ES6 to some users and ES5 to others.

See the documentation on building your app for production for more information.