Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

[next] context-loader bugs #325

Closed
thangngoc89 opened this issue Mar 18, 2016 · 6 comments
Closed

[next] context-loader bugs #325

thangngoc89 opened this issue Mar 18, 2016 · 6 comments
Labels

Comments

@thangngoc89
Copy link
Contributor

There is 2 bugs with latest content-loader:

  • Default loader should not be required at the top of the file. This would require user install remark-* while they don't need them.
  • webpack's loader parser remove all function from query ==> no custom engine

I suggest we ditch webpack loader's query completely and use a custom field in webpack config

@MoOx
Copy link
Owner

MoOx commented Mar 18, 2016

@thangngoc89
Copy link
Contributor Author

Ok. But not a good solution imho. This requires an extra file just for rendering markdown (or whatever).

@MoOx
Copy link
Owner

MoOx commented Mar 18, 2016

import === require, we should just call the require if no custom rendered passed.

@thangngoc89
Copy link
Contributor Author

I mean an extra file in user's project.

@thangngoc89 thangngoc89 changed the title [next] context-loader bug [next] context-loader bugs Mar 18, 2016
@MoOx MoOx mentioned this issue Mar 18, 2016
9 tasks
@MoOx
Copy link
Owner

MoOx commented Mar 18, 2016

No need for an extra file. We can just remove import defaultRenderer from "./default-renderer"import defaultRenderer from "./default-renderer" and use const renderer = query.renderer || require("./default-renderer").

@thangngoc89
Copy link
Contributor Author

And what about custom renderer ? user puts result of require.resolve to it ? Or we move the loader config to webpack config ? (like postcss-loader)

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

No branches or pull requests

2 participants