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

Use scss-bundle for bundling scss files #179

Closed
mofogasy opened this issue Sep 13, 2019 · 0 comments
Closed

Use scss-bundle for bundling scss files #179

mofogasy opened this issue Sep 13, 2019 · 0 comments

Comments

@mofogasy
Copy link
Contributor

Current behavior

In the SCION Workbench version 0.0.0-beta.26 we forgot to include a style sheet, which leads to applications not starting / building anymore. The following error is logged:

> [email protected] start C:\devsbb\scion-workbench-demo
> ng serve


Date: 2019-09-13T05:20:42.490Z
Hash: 020101783a168e1186ed
Time: 19538ms
chunk {main} main.js, main.js.map (main) 1.67 MB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 248 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 380 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 405 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 7.41 MB [initial] [rendered]

ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--13-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

@import './lib/workbench.constants';

/**
 * Provides styles for view drag and drop.
 */
@mixin wb-view-tab-drag-image-theme($theme) {
  .wb-view-tab-drag-image {
    display: grid;
    position: fixed;
    overflow: hidden;
    user-select: none;
    box-sizing: border-box;
    color: $viewpart_tab-active-fgcolor;
    background-color: $viewpart_tab-active-bgcolor;
    pointer-events: none;
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
    0 8px 10px 1px rgba(0, 0, 0, 0.14),
    0 3px 14px 2px rgba(0, 0, 0, 0.12);
  }
}


       ^
      Can't find stylesheet to import.
  ╷
1 │ @import './lib/workbench.constants';
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  node_modules\@scion\workbench\_view-drag-theme.scss 1:9  @import
  node_modules\@scion\workbench\_theming.scss 13:9         @import
  stdin 1:9                                                root stylesheet
      in C:\devsbb\scion-workbench-demo\node_modules\@scion\workbench\_view-drag-theme.scss (line 1, column 9)
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Failed to compile.

Expected behavior

In order to avoid such problems in the future, scss-bundle will be used for bundling all necessary style sheets when building the library.

Minimal reproduction of the problem with instructions

Update the SCION Workbench version of the Demo Application to version 0.0.0-beta.26 and then serve the application.

Environment

  • SCION Workbench version: 0.0.0-beta.26
  • Angular version: 8.0.0
@mofogasy mofogasy self-assigned this Sep 13, 2019
mofogasy added a commit that referenced this issue Sep 13, 2019
In Workbench version 0.0.0-beta.26 a stylesheet was not included in the
build, which stops applications from working. In order to prevent such
problems in the future, stylesheets are now bundled with scss-bundle.

fixes: #179
mofogasy added a commit that referenced this issue Sep 13, 2019
mofogasy added a commit that referenced this issue Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant