cmalven / vite-plugin-sass-glob-import

Use glob syntax for imports in your main Sass or SCSS file.
MIT License
18 stars 7 forks source link

ESM operation of this plugin #8

Closed kimishimayuya closed 1 year ago

kimishimayuya commented 1 year ago

First of all, let me apologize for my lack of English skills. Thank you for producing this wonderful plugin. One thing I would like to ask, do you have any plans to make this plugin work with ESM?

cmalven commented 1 year ago

@kimishimayuya Thanks for this comment. I'll definitely move it to ESM eventually, but I've found it works well as-is in both ESM and CommonJS projects so I haven't felt much pressure to migrate it fully.

Can you describe the issues you're experiencing with it that you think moving it to ESM would solve? It would help me judge how much to prioritize this. Thanks!

kimishimayuya commented 1 year ago

Thanks for your reply. My vite project uses a plugin that works by adding "type": "module" to package.json, but it didn't seem to coexist with your plugin.

That is what these two plugins are for. https://www.npmjs.com/package/@macropygia/vite-plugin-pug-static https://www.npmjs.com/package/@macropygia/vite-plugin-glob-input

Any suggestions for a better solution where the three plugins can coexist would be helpful. Thanks.

cmalven commented 1 year ago

@kimishimayuya Thank you for clarifying. I've just released a beta of 2.0.0 which should hopefully allow this plugin to work with "type": "module" in package.json. This version of the plugin will also require Vite ^4.0.0

When you have a moment, could you please install this beta version and let me know if it works for you?

npm i vite-plugin-sass-glob-import@2.0.0-beta.1 -D

kimishimayuya commented 1 year ago

Wow! That's great! I just tried it out and it seems to work! Thank you! Please keep up the great work!

cmalven commented 1 year ago

Resolved by https://github.com/cmalven/vite-plugin-sass-glob-import/releases/tag/2.0.0