ant-design / pro-editor

🕹️ The Ultimate Editor UI Framework and Components
https://pro-editor.antdigital.dev
MIT License
208 stars 26 forks source link

ProEditor 关联的leva模块,webpack5运行会报错 #87

Closed johnnychengchj123 closed 11 months ago

johnnychengchj123 commented 1 year ago

直接安装后,运行会报错,webpack5报如下错误 Module parse failed: Unexpected token (1:12) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

import type { UseBoundStore } from 'zustand' | import { StoreApiWithSubscribeWithSelector } from 'zustand/middleware' | import type { SpecialInput, RenderFn, FolderSettings, Plugin, OnChangeHandler } from './public' ERROR in ./node_modules/leva/src/types/internal.ts 1:12 Module parse failed: Unexpected token (1:12) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders import type { UseBoundStore } from 'zustand' | import { StoreApiWithSubscribeWithSelector } from 'zustand/middleware' | import type { SpecialInput, RenderFn, FolderSettings, Plugin, OnChangeHandler } from './public'

ONLY-yours commented 1 year ago

能提供一些更多的信息么?我这边没有遇到你这个问题。

johnnychengchj123 commented 11 months ago

额,我的问题,webpack后面配了一下,好了

CNFeffery commented 10 months ago

@johnnychengchj123 请问你后面webpack怎么配置的呢

johnnychengchj123 commented 10 months ago

@johnnychengchj123 请问你后面webpack怎么配置的呢

{ test: /\.(js|mjs|jsx|ts|tsx)$/, include: [paths.appSrc, paths.leva], }