You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) #1626
There are two sub projects in my project
/packages/A/src/**
/packages/shared/src/**
I referenced the shared project packages.json configuration in Project A as follows:
"devDependencies": {
"B": "workspace:*",
}
Project A refers to a method from Project shared, and I hope to build it normally
/projects/A/src/A.ts
/projects/A/rollup.config.js
/projects/shared/src/somemod.ts
// A.ts
import {theAnswer} from "shared/src/somemod";
console.log(theAnswer);
When I run the build in /projects/A/, the build failes with the described error.
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
Actual Behavior
During the actual process of building and packaging, I was constantly prompted:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
I have already configured the relevant plugins and it is normal to directly include this method in project A. However, I envision a directory for storing public methods.
Activity