Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

Ionic v3 sass.config.js ignore excludeFiles regex #1541

Open
@ghost

Description

Short description of the problem:

I have added sass.config.js file and properly configured on package.json.
I set this to accept every scss/css on includeFiles and exclude other scss through regex but it doesn't work because i see every styles on main.css builded.
This is my sass.config.js:

`module.exports = {

outputFilename: process.env.IONIC_OUTPUT_CSS_FILE_NAME,

sourceMap: false,

outputStyle: 'expanded',

autoprefixer: {
browsers: [
'last 2 versions',
'iOS >= 8',
'Android >= 4.4',
'Explorer >= 11',
'ExplorerMobile >= 11'
],
cascade: false
},

includePaths: [
'node_modules/ionic-angular/themes',
'node_modules/ionicons/dist/scss',
'node_modules/ionic-angular/fonts'
],

includeFiles: [
/.(s(c|a)ss)$/i
],

excludeFiles: [
/^(.*_(?=name).*\.scss$)/igm
//i want to exclude every xyz_name.scss (tested on regex101.com)
],

variableSassFiles: [
'{{SRC}}/theme/variables.scss'
],

directoryMaps: {
'{{TMP}}': '{{SRC}}'
},

excludeModules: [
'@angular',
'commonjs-proxy',
'core-js',
'ionic-native',
'rxjs',
'zone.js'
]

};`

What behavior are you expecting?

I expect that build every .scss except "_name.scss"

Steps to reproduce:

  1. use my sass.config.js
  2. create some *_name.scss
  3. ionic-app-scripts serve
  4. you see all the scss

Which @ionic/app-scripts version are you using?
3.1.10

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions