Questions tagged [stencil-compiler]
17 questions
37
votes
4 answers
How Stencil is different from React and Angular?
I am familiar with Angular and know basics of React. I was exploring stencil docs, I found stencil component has both @Component decorator and render() method -
component.tsx
import { Component, Prop } from '@stencil/core';
@Component({
tag:…

Swapnil Patwa
- 4,069
- 3
- 25
- 37
3
votes
1 answer
StencilJs does not generate app-global and index files in production build
I am trying to generate a production build in StencilJs using the command "npm run build". One of the generated js files in www build folder has imports of index-0e699d98.js and app-globals-320636ef.js. But these files are not present anywhere in…

Agrata
- 31
- 2
3
votes
2 answers
Stenciljs: Cannot find another component
I have created a new project in Stenciljs, but I have a problem using the components created in that project.
import { Component, h, Prop } from '@stencil/core';
@Component({
tag: 'fd-story',
styleUrl: './story.css',
shadow:…

Luis
- 2,006
- 5
- 31
- 47
2
votes
1 answer
StencilJS : Is it possible to set "globalStyle" on the stencil.config.ts file to a css from a node_module
Trying to set a global style css file on my stencil project. The only issue is that the specific css file I want to link is inside a node_module. I know I can import the css for each component but I was hoping to set it as a globalStyle.
Whenever I…

e_dev_austin
- 23
- 3
1
vote
1 answer
stencil config copy - 'copy' does not exist in type 'StencilConfig'
How can I use 'copy' in stencil config, I am trying to make all i18n.json be available after compilation.
export const config: Config = {
namespace: 'components',
plugins: [
...
],
outputTargets: [
...
],
copy: [
{
src:…

Evan
- 2,327
- 5
- 31
- 63
1
vote
1 answer
StencilJS: How to compile a component production-ready (so it's simple to be used in projects)
A group of volunteers has created a single/multi-select component using StencilJS: https://github.com/NothingAG/adg-components
Now we want to hand it over to the client so they can use it in their project.
My expectation was that the final result…

Joshua Muheim
- 12,617
- 9
- 76
- 152
1
vote
1 answer
BigCommerce Stencil CLI
I'm new to Stencil CLI. I recently install the same and noticed after some digging that the .stencil file is now deprecated but have no idea how to use it's replacements, which I assume is config.stencil.json and secrets.stencil.json. I am following…

Andre Bertram
- 13
- 2
1
vote
0 answers
Stencil Creating `.stencil` folder instead of `components` inside `dist/types` directory
Stencil Creating .stencil folder instead of components inside dist/types directory
I have tried with version 2.1.2 / 2.4.0/ 2.5.0
In all the cases, it is creating .stencil directory which contains all the components.
In other team mates system, it…

Shyam Kumar
- 586
- 3
- 17
1
vote
1 answer
Have stencil compiler ignore certain files?
A plugin is generating *.json files during the build and when I'm using the watch flag, it keep re-triggering the build forever.
Is there a way to tell Stencil to ignore certain filetypes on watch?

m0ngr31
- 791
- 13
- 29
1
vote
1 answer
Stencil dev build styling issue
We have done stencil upgrade recently and found styles issues in prod build package (stencil build). It is working fine when doing build with --dev parameter (stencil build --dev).
I have done more research and found the difference in style tag. In…

Ritesh Singh Rajput
- 341
- 2
- 13
1
vote
0 answers
Custom SCSS files not working on Bigcommerce Stencil
I imported the custom SCSS files in the theme.scss but files are still not working
in theme.scss: @import "mixins";
This should import my custom scss file named: _mixins.scss file which is is the same directory of theme.scss but it isn't working I…

Michal Pellicone
- 21
- 1
- 6
1
vote
0 answers
localStorage is not defined
I'm using localStorage and sessionStorage on a StencilProject.
When I'm running npm run dev --prod it's ok.
When I'm running npm run build this is KO.
Even with this error, my app works great on Chrome but not in Firefox.
The error…

Stephane
- 171
- 1
- 10
0
votes
2 answers
How to separate template out of stencil components (lazy load template)
Interesting problem, so please read till the end. what I want to achieve is separating template in another js file and lazyload it when required. This same thing when done in React ecosystem works, but stencil doesn't! Triage Repo…

minigeek
- 2,766
- 1
- 25
- 35
0
votes
1 answer
Drop down menu showing up at same time on hover
Im using Bigcommerce stencil.
Both dropdown menus show up when I hover.
My target is to hover on one link only one dropdown menu will pop up.
0
votes
1 answer
How can we return a customer created element in JS to the render of the webcomponent in stenciljs
I have a component which has a custom method to create an element, I create a custom element using js and return the array how can we use this array or elements/element to the be returned as a render element
Note: createCustomElement will have…

Rahul Gupta
- 69
- 2
- 14