ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.5k stars 783 forks source link

App doesn't render since v1.10.0 #2311

Closed sshrshnv closed 4 years ago

sshrshnv commented 4 years ago

Stencil version:

 @stencil/core@1.11.2

I'm submitting a:

[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

App doesn't render, root component is empty.

Expected behavior:

Render works well.

Steps to reproduce:

npm install @stencil/core@1.11.2

Related code: No code changes since version 1.9.x

sshrshnv commented 4 years ago

app-root.tsx: image

components.d.ts: image

It looks like no component is found. Build folder also doesn't contain component files.

image

manucorporat commented 4 years ago

can you share your tsconfig and stencil.config.ts files?

sshrshnv commented 4 years ago

can you share your tsconfig and stencil.config.ts files?

tsconfig:

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "allowUnreachableCode": false,
    "declaration": false,
    "strictPropertyInitialization": false,
    "experimentalDecorators": true,
    "lib": ["dom", "es2017"],
    "moduleResolution": "node",
    "module": "esnext",
    "target": "es2017",
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "allowJs": true,
    "noEmit": true,
    "strict": true,
    "isolatedModules": true,
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "jsx": "react",
    "jsxFactory": "h",
    "baseUrl": "./",
    "paths": {
      "~/*": ["./src/*/index.ts", "./src/*"],
    }
  },
  "include": ["src"],
  "exclude": ["node_modules"]
}

stencil.config.ts:

import { Config } from '@stencil/core'
import replace from '@rollup/plugin-replace'
import dotenv from 'dotenv'

dotenv.config({
  path: `.env.${process.argv.includes('--prod') ? 'prod' : 'dev'}`
})

export const config: Config = {
  outputTargets: [{
    type: 'www',
    dir: 'pwa',
    serviceWorker: null,
    copy: [
      { src: '../node_modules/tdweb/dist/**/*.worker.js', dest: '' },
      { src: '../node_modules/tdweb/dist/**/*.wasm', dest: '' },
      { src: '../node_modules/tdweb/dist/**/*.mem', dest: '' }
    ]
  }],
  plugins: [
    replace({
      values: process.env,
      delimiters: ['env.', ''],
      exclude: '**/node_modules'
    })
  ],
  devServer: {
    openBrowser: false
  }
}
sshrshnv commented 4 years ago

"noEmit": true breaks all. Maybe write this in the changelog?

markcellus commented 4 years ago

@sh-a-v we're having this same issue even in latest Stencil versions. How are you able to use noEmit?

sshrshnv commented 4 years ago

@mkay581 I deleted this option from config.

markcellus commented 4 years ago

Yeah but shouldn't the library still work if it's set? 🤔