Closed soletan closed 1 year ago
Hello',
Workaround: Add following configuration to the tsconfig.json (compilerOptions):
"baseUrl": "./",
"paths": {
"mini-signals": [
"node_modules/resource-loader/typings/mini-signals.d.ts"
]
}
Thanks for the workaround. However, I can't reproduce this issue right now, most apparently for having upgraded stencil from 2.3 to 2.4 recently.
I came across this issue when researching how to solve the same problem that I'm having with pixi.js and this dependency. See my related issue here: https://github.com/pixijs/pixi.js/issues/7305
When I add in the workaround to my tsconfig.json file it does not resolve the problem for me.
When I add in the workaround to my tsconfig.json file it does not resolve the problem for me.
@znorman-harris , actually it resolves my issue with pixijs 6
.
The only change I made is the property files
tsconfig.json
{
"compileOnSave": false,
"files": [ "node_modules/resource-loader/typings/mini-signals.d.ts" ],
"compilerOptions": {
"baseUrl": "./",
"strictPropertyInitialization": false,
"strictNullChecks": false,
"allowSyntheticDefaultImports": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"lib": [
"es2020",
"es6",
"dom"
],
"paths": {
// https://github.com/Hypercubed/mini-signals/issues/20
"mini-signals": [
"node_modules/resource-loader/typings/mini-signals.d.ts"
]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
@snowinmars Your approach doesn't work with Babel (CRA based app). The "paths" member is automatically removed when I run babel build:
The following changes are being made to your tsconfig.json file:
- compilerOptions.paths must not be set (aliased imports are not supported)
New version coming
Using mini-signals as an apparent sub-dependency of pixi.js in a stencil.js-based project, this line of code is causing a rather strict build configuration to fail:
https://github.com/Hypercubed/mini-signals/blob/f06098f3793e90cdd7432c8ecc62f5304eb4f45d/typings/mini-signals.d.ts#L19
Error is:
I can safely remove this line to circumvent this build obstacle, but I assume this isn't commonly intended solution.