Webpack
Ammolite can be used with Webpack as a plugin.
Installation
Install this package as a dev dependency in the project:
Configuration
Add the following webpack configuration:
webpack.config.js
For linking stylesheet into HTML, use html-webpack-plugin:
webpack.config.js
PostCSS Configuration
Ammolite also supports PostCSS with the @ammolite/postcss package.
Install these packages as dev dependencies in the project:
Add the following webpack configuration:
webpack.config.js
For integration with html-webpack-plugin:
webpack.config.js
Add the following PostCSS configuration:
postcss.config.js
In case there are no any CSS file, create one and import it:
./src/index.js