1.2.3 • Published 3 years ago

vite-plugin-amp v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm version code style: prettier Commitizen friendly semantic-release MIT License

vite-plugin-amp

Vite plugin for AMP project

Features

  • Remove all denied script tag
  • Inline all styles to amp-custom
  • img tag to amp-img
  • Automatically import all missing AMP component scripts.
  • Automatically add any missing mandatory AMP tags.
  • Optimize via amp-toolbox
  • Full AMP

Usage

npm i vite-plugin-amp -D # yarn add vite-plugin-amp -D

Add it to vite.config.ts

// vite.config.ts
import ViteAMP from 'vite-plugin-amp'

export default {
  plugins: [ViteAMP()]
}

Support

Support for only Server Side Generation. Please see example.

  • Vue3
  • React
  • Preact
  • lit-element

Limitation

AMP Project has limitation of Native JavaScript. Native Javascript doesn't work unless it's in the amp-script tag.

If you want to manage state, you can use amp-bind tag.

Todo

  • Frameworks other than Vue3
  • Add custom CSS size check
  • Hybrid mode
  • Optimize development environment

License

MIT

1.2.3

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

0.0.1-2

3 years ago

0.0.1-1

3 years ago

0.0.1-0

3 years ago