-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
0.29.2 breaks webpack build #195
Comments
See the discussion in #136. I'm sorry about this; I don't use JavaScript myself and I'm not up on the module technology. As far as I could tell, #136 was doing the right thing, but maybe not. It may work to do |
Thank you, I'm also not really into all the details about JS modules. I guess it would help to add to the readme how to include the library. I guess most people would try |
Sure. How do I fix it so that |
Again, I'm not an expert and haven't checked it, but I'd assume something like that should work in index.js: import Node from "./node.js"
import Parser from "./blocks.js";
import Renderer from "./render/renderer.js";
import HtmlRenderer from "./render/html.js";
import XmlRenderer from "./render/xml.js";
const lib = { Node, Parser, Renderer, HtmlRenderer, XmlRenderer };
export lib; // makes `import * as commonmark from 'commonmark'` work
export default lib; // makes `import commonmark from 'commonmark'` work But better let other experts double check that this works. |
not an expert but this is my understanding as well, at least for node 14.11+
this export setup should provide the two import styles, as well as import { lib } from './lib.js' // same as import * as lib from './lib.js' |
So, is this the normal thing to do, making both styles of import work? |
No, usually I'd only expect the export default thing that allows me to do |
For some reason I'm not sure about whether to continue supporting |
OK, having both styles seems to be a problem: |
Actually, I'm going to reopen this and try to get more feedback. |
I've reverted the changes related to this issue, for now. |
This required some manual changes, since these scripts have been adapted from an old ejected create-react-app config in this project. Requires a commonmark.js downgrade: commonmark/commonmark.js#195
This required some manual changes, since these scripts have been adapted from an old ejected create-react-app config in this project. Requires a commonmark.js downgrade: commonmark/commonmark.js#195
This required some manual changes, since these scripts have been adapted from an old ejected create-react-app config in this project. Requires a commonmark.js downgrade: commonmark/commonmark.js#195
This should be fixed by #203 |
I'm still getting |
Since 0.29.2 I'm getting the following error when building a Vue component that uses commonmark.js:
Im importing with
import commonmark from 'commonmark';
.I'm building with vue-cli and that uses webpack again. I suspect that #186 broke it, at least I can make it work by downgrading to 0.29.1.
The text was updated successfully, but these errors were encountered: