svelte-preprocess-remove-attribute

1.0.5 • Public • Published

Usage

Assume that you want to remove data-test attribute from svelte component. In your webpack.config.js:

module: {
    rules: [
      {
        test: /\.(html|svelte)$/,
        exclude: /node_modules/,
        use: {
          loader: 'svelte-loader',
          options: {
            preprocess: [
              require('svelte-preprocess')({}),
              require('svelte-preprocess-remove-attribute')({
                filter: name => {
                  return name !== 'data-test';
                },
              }),
            ],
          },
        },
      },
    ],
  },

/svelte-preprocess-remove-attribute/

    Package Sidebar

    Install

    npm i svelte-preprocess-remove-attribute

    Weekly Downloads

    385

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    3.77 kB

    Total Files

    4

    Last publish

    Collaborators

    • ypyf