Closed adamJLev closed 6 years ago
Hey, to do this you can just add webpack alias and replace the css import.
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'@': resolve('src'),
'simplemde': 'easymde',
}
},
@import '~easymde/dist/easymde.min.css';
Hi @F-loat !
I'm not yet that familiar with webpack config. Where exactly do I have to do this? So far I guess I have to edit the file /node_modules/vue-simplemde/webpack.config.js?
Would I have to edit the code below or add a new one and how will this take effect after editing? :)
resolve: { alias: { 'vue$': 'vue/dist/vue.esm.js' } },
Thanks and sorry for bothering you with that might be a simple question :)
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'simplemde': 'easymde'
}
},
import simplemde
will get easymde
. [doc]
Ah, thanks!
For anybody using the Vue cli, you can create a vue.config.js
file in your project root with:
module.exports = {
configureWebpack: {
resolve: {
alias: {
simplemde: 'easymde',
},
},
},
};
Restart Webpack and it should work.
As an aside, I do think it would be good for this lib to use an editor that's kept up to date, but as long as EasyMDE is kept compatible I guess it's not a big deal.
simplemde hasn't been updated since almost 4 years. IMHO switching this project to easymde would be a good idea...
https://github.com/NikulinIlya/vue-easymde a workaround with easymde.
@F-loat Yes, but as you said: It's a workaround.
Hi there,
First of all thanks for your work, this project has helped me a lot in getting things built fast.
There's a new "official fork" of simpleMDE called easyMDE: https://github.com/ionaru/easy-markdown-editor. simpleMDE hasn't been updated in over 2 years now and has a lot of issues: https://github.com/sparksuite/simplemde-markdown-editor/issues
The libs are compatible, so it shouldn't be too much work. Mainly we would just need to make this import be optional or let the user pass in an instance of "MDE" via
config
: https://github.com/F-loat/vue-simplemde/blob/master/src/markdown-editor.vue#L8Or maybe you have a better idea, what do you think?
Thanks!