/snowpack-posthtml

Boilerplate for Snowpack + PostHTML

Primary LanguageJavaScript

Boilerplate for Snowpack + posthtml

Configurations

Only snowpack.config.js

module.exports = {
  mount: {
    public: { url: '/', static: true },
    src: { url: '/' },
  },
  plugins: [
    ['./posthtml-transform', {
      plugins: {
        'posthtml-modules': { root: './src', },
      },
    }],
  ],
};

snowpack.config.js + posthtml.config.js

snowpack.config.js

module.exports = {
  mount: {
    public: { url: '/', static: true },
    src: { url: '/' },
  },
  plugins: [
    './posthtml-transform',
  ],
};

posthtml.config.js

module.exports = (ctx) => {
  return {
    ...options,
    plugins: {
      'posthtml-modules': { root: './src', },
    }
  }
}

See also