Skip to content

Commit

Permalink
Fixed jest for shaders loaders upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
pelusanchez committed Oct 11, 2021
1 parent c1b9bfa commit 6a1a8dd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/shaders/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import FRAGMENT_SHADER from './fragment_shader.frag';
import VERTEX_SHADER from './vertex_shader.vert';
import FRAGMENT_SHADER from '!!raw-loader!./fragment_shader.frag';
import VERTEX_SHADER from '!!raw-loader!./vertex_shader.vert';
export { FRAGMENT_SHADER, VERTEX_SHADER };
7 changes: 7 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = {
moduleNameMapper: {
"^!!raw-loader!.*": "jest-raw-loader",
}
}

export default config;
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
"@babel/preset-env": "^7.13.9",
"@babel/preset-typescript": "^7.13.0",
"@types/jest": "^26.0.20",
"babel-jest": "^26.6.3",
"jest": "^26.6.3",
"babel-jest": "^27.2.5",
"jest": "^27.2.5",
"jest-raw-loader": "^1.0.1",
"raw-loader": "^4.0.2",
"source-map": "^0.7.3",
"ts-loader": "^8.0.17",
"ts-node": "^10.2.1",
"typescript": "^4.2.2",
"webpack": "^5.24.3",
"webpack-cli": "^4.5.0",
Expand Down
4 changes: 2 additions & 2 deletions src/shaders/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import FRAGMENT_SHADER from './fragment_shader.frag';
import VERTEX_SHADER from './vertex_shader.vert';
import FRAGMENT_SHADER from '!!raw-loader!./fragment_shader.frag';
import VERTEX_SHADER from '!!raw-loader!./vertex_shader.vert';
export { FRAGMENT_SHADER, VERTEX_SHADER }

0 comments on commit 6a1a8dd

Please sign in to comment.