Skip to content

Usage with solid-js #795

Answered by PodaruDragos
PodaruDragos asked this question in Q&A
Discussion options

You must be logged in to vote

For anyone arriving here, this is what works for me.

    {
      issuer: /\.[jt]sx?$/,
      test: /\.svg$/,
      use: [
        {
          loader: 'babel-loader',
          options: {
            presets: ['solid'],
          }
        },
        {
          loader: '@svgr/webpack',
          options: {
            babel: false,
            jsxRuntime: 'automatic',
            jsxRuntimeImport: { source: 'solid-js', specifiers: [] },
            prettier: false,
            ref: false,
            svgo: false,
            svgoConfig: {
              plugins: [{ removeViewBox: false }]
            },
            titleProp: true
          }
        }
      ]
    },

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by PodaruDragos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #794 on November 02, 2022 16:26.