Skip to content
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

Allow babelified/'export default' resources to be fed into catalog/loader #407

Closed
wants to merge 1 commit into from

Conversation

Cethy
Copy link

@Cethy Cethy commented Apr 19, 2018

Use case:
During development of a (pre) loader for Catalog (@see discussion in #403), I stumble across some error when trying to feed a "babelified" React Component to the catalog/loader.

eg:

{
    test: /(\.catalog-builder\.yml)/,
    use: ['catalog/loader', 'babel-loader', 'my-custom-loader']
},

@jstcki
Copy link
Contributor

jstcki commented Aug 23, 2018

Thanks and sorry for only getting back to you now! This is cool but does it also still work with HMR? I think you'd need to call require() in the module.hot.accept callback again instead of referencing the resource. So I'd probably revert to separate require calls but wrap the ES module check in a function that returns the module.

@jstcki
Copy link
Contributor

jstcki commented Feb 7, 2019

The upcoming @catalog/markdown-loader now expects a Markdown string as input only, so this won't be supported and has to be implemented differently. Thanks anyway!

@jstcki jstcki closed this Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants