Webpack
-
Install the package:
Terminal window npm install aeo.js -
Add the plugin to your Webpack config:
webpack.config.js const { AeoWebpackPlugin } = require('aeo.js/webpack');module.exports = {plugins: [new AeoWebpackPlugin({title: 'My Site',description: 'A site optimized for AI discovery',url: 'https://mysite.com',}),],};
How it works
Section titled “How it works”The Webpack plugin:
- Runs during the
emitphase of the Webpack compilation - Generates all AEO files in your output directory
- Injects the widget into your HTML entry point
Configuration
Section titled “Configuration”Pass any AeoConfig options to the plugin:
new AeoWebpackPlugin({ title: 'My Site', url: 'https://mysite.com', widget: { enabled: true, position: 'bottom-right', },});