Comments (4)
the way i see it is really simple, just provide option to take the path relative to project dir, and feed it to TS and that is all. Fuse is now and should always be transparent about plugins, in essence it should only receive content wither it is compiled or not and do the bundling.
from fuse-box.
Thank you very much for the ideas.
Good thinking. I was expecting someone to raise that topic sooner or later =)
- tsconfig.json will be configurable (it was on my list)
-
- Can be done (any suggestions how?)
- I guess it's a bug.
.tsx
should trigger typescript mode.
When you are in typescript mode and do an import that looks like import foo from "./foo"
FuseBox has to know that you are referring to a .ts
extension not .js
Let me know what you think
Cheers
from fuse-box.
Regarding the strictness: I think this suggestion is a plausible approach (read the contents, minify, feed into JSON.parse
).
Another way to do this would be to mimic the behaviour of ts itself, as depicted in the pr that introduced comments to tsconfig.
Although the best solution in my opinion would be for ts to expose a parseConfigFile
method to help developers maintain a consistent way of parsing the config file across projects that depend on it. I guess I'll post a suggestion on their issue tracker.
EDIT: apparently the aforementioned parseConfigFileTextToJson() is already exposed. Example usage:
const fs = require('fs');
const ts = require('typescript');
const configPath = './tsconfig.json';
const tsconfig = fs.readFileSync(configPath).toString();
const parsedConfig = ts.parseConfigFileTextToJson(configPath, tsconfig); // the first argument seems to be used only for diagnostics
// parsedConfig.config contains the configuration object that can be passed to fuse-box
from fuse-box.
this is now supported, please reopen if otherwise :)
from fuse-box.
Related Issues (20)
- pluginConsolidate not working HOT 1
- "manifest" RunProps are ignored
- css background-image url with @ in path is not managed as resource HOT 7
- incorrect removal of parentheses in `(-(--t))`
- fuse-box@4 vue2.x.x .vue files support
- Log output indicates that `'@'` characters in file paths are changed into `'undefined'`
- Incorrect processing of awaited brackets
- ESM output support HOT 3
- Node_modules folder debug HOT 1
- node-sass is deprecated HOT 2
- Sass, and non-existent .css.map files HOT 2
- Failed to resolve %23clip in a css file HOT 4
- Transpilation Error with fuse-box 4.0.0 (or maybe I'm simply blind) HOT 1
- 4.0.0 Dependency bundled as two separate instances in production build
- `rootDir` does not exist in type IPublicOutputConfig
- Cannot find module: fuse-box/sparky HOT 7
- Is it possible to share an assets folder between two projects?
- Support Angular 13
- TypeError: Cannot read property 'filename' of undefined HOT 4
- Archive project
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 fuse-box.