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

Docz error: You may need an appropriate loader to handle this file type. #1

Closed
Dohxis opened this issue Apr 19, 2019 · 1 comment
Closed

Comments

@Dohxis
Copy link

Dohxis commented Apr 19, 2019

Describe the bug
Getting an appropriate loader error when trying to run docs.

To Reproduce
Just followed the README and example project to setup stencil component library.

Expected behavior
Docz should run.

Part of package.json

{
	"module": "dist/esm/index.js",
	"main": "dist/index.js",
	"unpkg": "dist/ionic.js",
	"types": "dist/types/components.d.ts",
	"collection": "dist/collection/collection-manifest.json",
	"files": [
		"dist/"
	],
	"scripts": {
		"docz:dev": "docz dev",
		"docz:build": "docz build",
		"stencil:dev": "stencil build --watch --serve --docs",
		"stencil:build": "stencil build --docs",
		"build": "npm run stencil:build && npm run docz:build",
		"start": "concurrently \"npm run stencil:dev\" \"npm run docz:dev\""
	},
	"devDependencies": {
		"@stencil/core": "0.18.1",
		"concurrently": "^4.1.0",
		"docz": "^1.0.0-rc.3",
		"docz-plugin-stencil": "^0.4.3",
		"docz-theme-default": "^1.0.0-rc.3",
		"fs-extra": "^7.0.1",
		"tslint": "^5.10.0",
		"tslint-ionic-rules": "0.0.21",
		"tslint-react": "^3.6.0",
		"wait-on": "^3.2.0"
	}
}

Probably missing something here.

Error

[1]  ERROR  Failed to compile with 3 errors11:16:54
[1] 
[1]  error  in ./node_modules/docz/dist/index.esm.js
[1] 
[1] Module parse failed: Unexpected token (16:38)
[1] You may need an appropriate loader to handle this file type.
[1] | import { MDXProvider } from '@mdx-js/react';
[1] | 
[1] > const BasePlayground = loadable(() => import('./chunk.esm2.js'));
[1] | const Playground = props => typeof window !== 'undefined' ? (createElement(Suspense, { fallback: null },
[1] |     createElement(BasePlayground, Object.assign({}, props)))) : null;
[1] 
[1]  @ ./.docz/app/root.jsx 9:0-59 16:2-15 18:19-23 25:25-31
[1]  @ ./.docz/app/index.jsx
[1]  @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
[1] 
[1]  error  in ./node_modules/docz-theme-default/dist/index.esm.js
[1] 
[1] Module parse failed: Unexpected token (251:34)
[1] You may need an appropriate loader to handle this file type.
[1] | `;
[1] | 
[1] > const CodeMirror = loadable(() => import('./chunk.esm2.js'));
[1] | const getLanguage = (children) => {
[1] |     const defaultLanguage = 'jsx';
[1] 
[1]  @ ./.docz/app/root.jsx 11:0-39 17:29-34
[1]  @ ./.docz/app/index.jsx
[1]  @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
[1] 
[1]  error  in ./.docz/app/imports.js
[1] 
[1] Module parse failed: Unexpected token (8:11)
[1] You may need an appropriate loader to handle this file type.
[1] | export var imports = {
[1] |   'src/components/table/docs.mdx': function srcComponentsTableDocsMdx() {
[1] >     return import(
[1] |     /* webpackPrefetch: true, webpackChunkName: "src-components-table-docs" */
[1] |     'src/components/table/docs.mdx');
[1] 
[1]  @ ./.docz/app/root.jsx 12:0-36 26:13-20
[1]  @ ./.docz/app/index.jsx
[1]  @ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
@DanielNetzer
Copy link
Owner

it seems like an issue with Docz doczjs/docz#817

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

No branches or pull requests

2 participants