Comments (14)
@xc2 thanks a lot but why string literal change the behavior?
@krutoo That's not expected for us. We will fix this. ;-)
from rspack.
This was fixed in DefinePlugin refactor.
from rspack.
I was not able to reproduce this panic locally. Here's what I get:
❯ npm run build
> [email protected] build
> rspack
ERROR in ./src/pages/authors/index.tsx
× Package subpath './preset/node-handler' is not defined by "exports" in /Users/bytedance/Projects/rspack-issue-reproduce/isomorph-bun-vs-node/node_modules/@sima-land/isomorph/package.json
ERROR in ./src/pages/posts/index.tsx
× Package subpath './preset/node-handler' is not defined by "exports" in /Users/bytedance/Projects/rspack-issue-reproduce/isomorph-bun-vs-node/node_modules/@sima-land/isomorph/package.json
Rspack compiled with 2 errors in 972 ms
from rspack.
@h-a-n-a I dont see errors like on your case, do you use ubuntu?
from rspack.
@h-a-n-a can you also make cat ./node_modules/@sima-land/isomorph/package.json | grep node-handler
?
Because this export is defined in package.json
from rspack.
@krutoo please provide the sima-land-isomorph-0.0.0.tgz
file.
public version of @sima-land/isomorph has no exports related to node-handler
from rspack.
@krutoo please provide the
sima-land-isomorph-0.0.0.tgz
file.public version of @sima-land/isomorph has no exports related to node-handler
@xc2 Folder "./tgz" in repo (sorry for wrong path in package.json, repo now is updated)
please also use npm run dev
from rspack.
just tried ubuntu 20.04(x86_64) and debian bookworm(arm64) with no luck to reproduce.
weird
from rspack.
Hmmm, i fully remove node_modules and reinstall it and it works, soory for taking your time
from rspack.
@xc2 @h-a-n-a i found that it was my stashed code
try this branch please (npm run dev
)
https://github.com/krutoo/isomorph-bun-vs-node/tree/rspack-panic
from rspack.
thanks @krutoo it reproduces.
it is caused by code below
import( /* webpackIgnore: true */ `bun:jsc`)
swc will transform it into import("bun:jsc");
by default when the request is in template literals. playground
there're two approach to avoid:
- modify it to
import( /* webpackIgnore: true */ "bun:jsc")
: playground - or turn
jsc.preserveAllComments
on forbuiltin:swc-loader
: playground
#5775 this issue will also help
from rspack.
@xc2 thanks a lot but why string literal change the behavior?
from rspack.
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
from rspack.
bump
from rspack.
Related Issues (20)
- [Bug]: live reload of styles lazy components is broken when using hashes in names HOT 3
- [Bug]: Failed to resolve tsconfig paths when using extends(version:0.7.1) HOT 2
- [Bug]: Cannot get final name for export '__esModule' HOT 12
- [Bug] Invalid fallback `"javascript/auto"` rule.type passed to getRawGeneratorOptions HOT 4
- [Bug]: Evaluating context request with conditional expression
- [Bug]: Debugging in browser with rspack serve shows multiple copies of a source file.
- [Doc]: Missing sentence in optimization.mergeDuplicateChunks part of docs HOT 2
- [Bug]: fix types for transform `CopyRspackPlugin` HOT 1
- [Feature]: support for exclude option by SwcCssMinimizerRspackPlugin
- [Bug]: `fork-ts-checker-webpack-plugin` intermittently and frequently breaks when building / using dev-server HOT 2
- [Bug]: compatibility plugin not works well
- [Bug]: Panic when `concatenateModules` and `CssExtractRspackPlugin` used HOT 3
- [Bug]: reexport will have duplicate key in object
- test: add more test cases for runtime ids and condition expression
- Dev Server errors on code changes: StringExpected, Failed to convert JavaScript value `Undefined` into rust type `String` HOT 1
- [Bug]: SVG external references unofficially work with hacks HOT 1
- [Bug]: Reopen https://github.com/web-infra-dev/rspack/issues/6714 HOT 2
- [Bug]: web worker error in host HOT 1
- [Bug]: incorrect LICENSE.txt HOT 1
- [Bug]: Global polyfill no longer seems to work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspack.