Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: process with plugin raw svg #117

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

fix: process with plugin raw svg #117

wants to merge 3 commits into from

Conversation

wasap
Copy link

@wasap wasap commented Jul 5, 2023

No description provided.

@jpkleemans
Copy link
Owner

jpkleemans commented Jul 6, 2023

Hi, thanks for your PR! Could you add a Cypress test that shows the problem this PR solves? (That test should fail without your fix)

@wasap
Copy link
Author

wasap commented Jul 6, 2023

when i used in webpack raw svgo loader

 {
                loader: 'svgo-loader',
                options: {
                  plugins: [
                    'preset-default',
                    'prefixIds',
                    { 'name': 'removeViewBox', 'active': false },
                    { 'name': 'removeDimensions' },
                    {
                      'name': 'removeAttrs',
                      'params': {
                        attrs: '*:(stroke|fill):((?!^none$).)*',
                      },
                    },
                  ],
                },
              },

it responded me svg with plugins applied, but here i found that you just return raw text without processing. so i made it similar to webpack

index.js Outdated
@@ -1,5 +1,5 @@
const fs = require('fs').promises
const { compileTemplate } = require('vue/compiler-sfc')
const { compileTemplate } = require('@vue/compiler-sfc')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { compileTemplate } = require('@vue/compiler-sfc')
const { compileTemplate } = require('vue/compiler-sfc')

@jpkleemans
Copy link
Owner

Thanks for your explanation. I understand it now! Can you fix my comment? Then i'll merge it

@digitalkaoz
Copy link

@jpkleemans any progress on this? can you apply the change yourself?

@wasap
Copy link
Author

wasap commented Apr 23, 2024

hi, i fixed your request, please reviw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants