Code Monkey home page Code Monkey logo

Comments (5)

WarrenJones avatar WarrenJones commented on May 27, 2024

can you provide a minimal repo link that can reproduce the problem you ran into?or just list the source code that cause the error

from vite-plugin-require-transform.

yuguaa avatar yuguaa commented on May 27, 2024

#6 (comment)
请问怎么解决的啊

from vite-plugin-require-transform.

WarrenJones avatar WarrenJones commented on May 27, 2024

#6 (comment) 请问怎么解决的啊

可以提供下报错的文件或者截图么

from vite-plugin-require-transform.

yuguaa avatar yuguaa commented on May 27, 2024

#6 (comment) 请问怎么解决的啊

可以提供下报错的文件或者截图么

antd引入的一个插件报错了,配了external不打包他了

from vite-plugin-require-transform.

baoweijun avatar baoweijun commented on May 27, 2024

开发环境的时候正常,打包构建的时候如果fileRegex写了/.js$|.jsx$|.vue$/就报错 vite.config.js: defineConfig({ plugins: [ requireTransform({ fileRegex: /.js$|.jsx$|.vue$/, }) ], }) 只写.vue正常打包 requireTransform({ fileRegex: /.vue$/, }),

错误日志 ✓ 516 modules transformed. [vite_plugin_require_transform] Unexpected token (1:33) - make sure this is an expression.

1 | (vite_plugin_require_transform./)
| ^
file: C:/Users/Administrator/Desktop/xx/node_modules/call-bind@1.0.2@call-bind/callBound.js:1:33
error during build:
SyntaxError: Unexpected token (1:33) - make sure this is an expression.
1 | (vite_plugin_require_transform./)
| ^
at instantiate (...\node_modules
@[email protected]@@babel\parser\lib\index.js:72:32)
at constructor (...@[email protected]@@babel\parser\lib\index.js:358:12)
at Parser.raise (...\node_modules
@[email protected]@@babel\parser\lib\index.js:3335:19)

你解决了吗

from vite-plugin-require-transform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.