Giter VIP home page Giter VIP logo

Comments (3)

rizrmd avatar rizrmd commented on May 14, 2024 3

OK, I just added import React from "react" to all my pages and my components manually,
error message ReferenceError: React is not defined are gone - maybe we can improve esbuild-loader by specifying what module to auto import in jsx/tsx file ?

And another error sprouted, I am using blitzjs though, so maybe following error message are not applicable to regular nextjs project:

Error  Cannot find module '../webpack-runtime.js'
Require stack:
- C:\Users\Riz\Desktop\parentuniv\.blitz\caches\dev\.next\__db.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\@blitzjs\server\dist\server.cjs.development.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\@blitzjs\server\dist\index.js
- C:\Users\Riz\Desktop\parentuniv\.blitz\caches\dev\next.config.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\next\dist\next-server\server\config.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\next\dist\next-server\server\next-server.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\next\dist\server\next.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\next\dist\server\lib\start-server.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\next\dist\cli\next-dev.js
- C:\Users\Riz\Desktop\parentuniv\node_modules\next\dist\bin\next
- C:\Users\Riz\Desktop\parentuniv\node_modules\@blitzjs\server\bin\next-patched

from esbuild-loader.

rizrmd avatar rizrmd commented on May 14, 2024

FYI, this is indeed faster than regular webpack 5 on [email protected]. The speed improvement is noticable (I don't count it though).

from esbuild-loader.

privatenumber avatar privatenumber commented on May 14, 2024

Thanks for the issue @rizkyramadhan

maybe we can improve esbuild-loader by specifying what module to auto import in jsx/tsx file ?

esbuild-loader deals with interfacing esbuild from Webpack to apply transformations and doesn't concern itself with dependency resolution.

To implicitly resolve dependencies in your build, you can use the ProvidePlugin built-in to Webpack.

The second error doesn't seem relevant to esbuild-loader either.

from esbuild-loader.

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.