Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

globalStyle not updated during development with ES5 #1388

Closed
mrtnmgs opened this issue Feb 22, 2019 · 1 comment · Fixed by #5244
Closed

globalStyle not updated during development with ES5 #1388

mrtnmgs opened this issue Feb 22, 2019 · 1 comment · Fixed by #5244
Labels

Comments

@mrtnmgs
Copy link

mrtnmgs commented Feb 22, 2019

Stencil version:

 @stencil/core@0.18.0

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:

When running the development server with --es5 flag, the changes made to the global SASS file (set with globalStyle in stencil config file) have no effect. I have to quit and restart the server to see the changes.

Expected behavior:

The global style changes should appear without having to stop the server and start it again.
If for some reason that was not possible, the warning message in the console should mention that limitation.

Steps to reproduce:

  • add a global style SASS file using the globalStyle property in stencil.config.ts, and add it to the sass plugin so it is compiled.
  • run npm start --es5
  • make changes in the SASS files and save
  • Refresh the browser manually if necessary (In IE11 I get an additional "Out of stack space" error, which seems to prevent automatic reloading)

Related code:

// stencil.config.ts
import { Config } from "@stencil/core";
import { sass } from "@stencil/sass";

export const config: Config = {
  namespace: "componentlibrary",
  outputTargets: [
    { type: "dist", dir: "../dist/files" },
    {
      type: "www",
      serviceWorker: null // disable service workers
    }
  ],
  globalStyle: "src/global/app.scss",
  plugins: [
    sass({
      injectGlobalPaths: [
        "src/global/app.scss"
      ]
    })
  ]
};

Other information:

@christian-bromann
Copy link
Member

The fix for this issue has been released as a part of today's Stencil v4.11.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants