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.59k stars 789 forks source link

Stencil JS dist and ng serve in angular version 6.1.0 not serving the application #2028

Closed dhineeth closed 2 years ago

dhineeth commented 5 years ago

Stencil version:

 @stencil/core@<1.7.5>

I'm submitting a:

[ ] bug report

Current behavior:

Expected behavior:

The ng serve should compile the angular app version 6.1.0 successfully and we should be able to use the components in the angular app version 6.1.0.

Steps to reproduce:

Related code: Stencil config file

import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';

export const config: Config = {
  namespace: 'stencil-charts',
  bundles:[
    {components:['atai-bar-chart']}
  ],
  outputTargets: [
    {
      type: 'dist',
      esmLoaderPath: 'loader'
    },
    {
      type: 'docs-readme'
    },
    {
      type: 'docs'
    },
    {
      type: 'www',
      serviceWorker: null // disable service workers
    }
  ],
  plugins: [
    sass()
  ]
}; 

Below is the main.ts file in angular app

// insert any relevant code here
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

import { defineCustomElements } from 'atai-charts/dist/loader'
if (environment.production) {
  enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));

defineCustomElements(window)

Other information:

rwaskiewicz commented 2 years ago

Hey there 👋

I apologize it took so long for someone on the team to acknowledge this issue. At this time, Stencil v1 and lower is no longer supported. As a result, I'm going to close this issue.

If this issue is still occurring in Stencil v2, can you please create a new issue for us with a minimal reproduction case? Thanks!