1

I have .scss file. I imported it inside .ts file but the app can't get built.

I have _export.scss and _export.scss.d.ts files.

enter image description here

The error is;

./apps/appe/src/_export.scss:1:0 - Error: Module parse failed: Unexpected token (1:0) File was processed with these loaders:

  • ./node_modules/resolve-url-loader/index.js
  • ./node_modules/@angular-devkit/build-angular/node_modules/sass-loader/dist/cjs.js You may need an additional loader to handle the result of these loaders.

:export { | white: #fff; | }

× Failed to compile.

_export.scss file;

:export {
  white: #fff;
}

appcomponent.ts file;

import { Component, OnInit } from '@angular/core';
import sassVariablesExport from '../_export.scss';

@Component({
  selector: 'qwe-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {
  title = 'appe';

  ngOnInit(): void {
    let qweee = sassVariablesExport;
  }
}

Github linke

Murat Can OĞUZHAN
  • 735
  • 11
  • 19

0 Answers0