jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
555 stars 59 forks source link

deprecated sourcemap-codec@1.4.8 #93

Closed mahnunchik closed 7 months ago

mahnunchik commented 1 year ago
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
└─┬ vite-svg-loader@4.0.0
  └─┬ @vue/compiler-sfc@3.2.47
    └─┬ magic-string@0.25.9
      └── sourcemap-codec@1.4.8

According to the documentation of @vue/compiler-sfc module https://www.npmjs.com/package/@vue/compiler-sfc it may be replaced by main vue package.

gkatsanos commented 1 year ago

@mahnunchik sourcemap-codec isn't a direct dependency of this package. I don't see what we can do about it?

mahnunchik commented 1 year ago

@gkatsanos According to the documentation of @vue/compiler-sfc it should be replaced by main vue package as:

const { compileTemplate } = require('vue/compiler-sfc')
// or

import { compileTemplate } from 'vue/compiler-sfc/index.js';

Note: as of 3.2.13+, this package is included as a dependency of the main vue package and can be accessed as vue/compiler-sfc. This means you no longer need to explicitly install this package and ensure its version match that of vue's. Just use the main vue/compiler-sfc deep import instead.

gkatsanos commented 1 year ago

@mahnunchik : https://github.com/jpkleemans/vite-svg-loader/pull/103/files

mahnunchik commented 1 year ago

@gkatsanos great, thank you! I think vue can be added to peerDependencies.

mahnunchik commented 1 year ago

@gkatsanos could you please release 4.1 to npm

gkatsanos commented 1 year ago

I dont have publish permissions. @jpkleemans

jpkleemans commented 7 months ago

Released