Skip to content

Commit

Permalink
fix: resolution logic
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Jun 22, 2020
1 parent 20b7a11 commit 3abe3f5
Show file tree
Hide file tree
Showing 12 changed files with 4,660 additions and 4,228 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Lint
run: npm run lint

- name: Security audit
run: npm run security
# - name: Security audit
# run: npm run security

- name: Check commit message
uses: wagoid/commitlint-github-action@v1
Expand Down
7,597 changes: 3,863 additions & 3,734 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions package.json
Expand Up @@ -59,43 +59,43 @@
"clone-deep": "^4.0.1",
"loader-utils": "^2.0.0",
"neo-async": "^2.6.1",
"schema-utils": "^2.6.6",
"schema-utils": "^2.7.0",
"semver": "^7.3.2"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@babel/cli": "^7.10.3",
"@babel/core": "^7.10.3",
"@babel/preset-env": "^7.10.3",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@webpack-contrib/defaults": "^6.3.0",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^25.4.0",
"bootstrap": "^4.4.1",
"babel-jest": "^26.0.1",
"bootstrap": "^4.5.0",
"bootstrap-sass": "^3.4.1",
"cross-env": "^7.0.2",
"css-loader": "^3.5.2",
"css-loader": "^3.6.0",
"del": "^5.1.0",
"del-cli": "^3.0.0",
"eslint": "^6.8.0",
"del-cli": "^3.0.1",
"eslint": "^7.3.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-import": "^2.21.2",
"fibers": "^5.0.0",
"file-loader": "^6.0.0",
"foundation-sites": "^6.6.3",
"husky": "^4.2.5",
"jest": "^25.4.0",
"lint-staged": "^10.1.7",
"memfs": "^3.1.2",
"node-sass": "^4.14.0",
"jest": "^26.0.1",
"lint-staged": "^10.2.11",
"memfs": "^3.2.0",
"node-sass": "^4.14.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"sass": "^1.26.3",
"standard-version": "^7.1.0",
"style-loader": "^1.1.4",
"sass": "^1.26.8",
"standard-version": "^8.0.0",
"style-loader": "^1.2.1",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"keywords": [
"sass",
Expand Down
2 changes: 1 addition & 1 deletion src/webpackImporter.js
Expand Up @@ -63,13 +63,13 @@ function webpackImporter(loaderContext, includePaths) {
mainFiles: [],
modules: [],
});
// TODO implement the `restrictions` option for `enhanced-resolve` and avoid resolution `js` files from the `mainFields`
// TODO avoid resolsing `_index`, `index` and files without extensions
// TODO avoid resolving with multiple extensions - `file.sass.sass`/`file.sass.scss`/`file.sass.css`
const webpackResolve = loaderContext.getResolve({
mainFields: ['sass', 'style', 'main', '...'],
mainFiles: ['_index', 'index', '...'],
extensions: ['.sass', '.scss', '.css'],
restrictions: [/\.((sa|sc|c)ss)$/i],
});

return (originalUrl, prev, done) => {
Expand Down

0 comments on commit 3abe3f5

Please sign in to comment.