1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

added react fast reload

This commit is contained in:
Fedor Katurov 2020-11-29 10:51:04 +07:00
parent 25dade6c67
commit 6a6985c39b
4 changed files with 45 additions and 37 deletions

View file

@ -1,4 +1,5 @@
const CracoAlias = require('craco-alias');
const fastRefreshCracoPlugin = require('craco-fast-refresh');
module.exports = {
webpack: {
@ -14,27 +15,28 @@ module.exports = {
mode: 'file',
},
jest: {
setupTestFrameworkScriptFile: "<rootDir>/src/setupTests.js",
setupTestFrameworkScriptFile: '<rootDir>/src/setupTests.js',
configure: {
moduleNameMapper: {
"^~/(.*)$": "<rootDir>/src/$1",
"^.+\\.scss$": "identity-obj-proxy"
'^~/(.*)$': '<rootDir>/src/$1',
'^.+\\.scss$': 'identity-obj-proxy',
},
snapshotSerializers: ["enzyme-to-json/serializer"],
moduleFileExtensions: ["js", "json", "ts", "tsx", "jsx", "node"],
snapshotSerializers: ['enzyme-to-json/serializer'],
moduleFileExtensions: ['js', 'json', 'ts', 'tsx', 'jsx', 'node'],
verbose: true,
roots: ["<rootDir>/src"],
roots: ['<rootDir>/src'],
transform: {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.ts?$": "babel-jest",
"^.+\\.js?$": "ts-jest",
"^.+\\.jsx?$": "babel-jest"
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.ts?$': 'babel-jest',
'^.+\\.js?$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
},
preset: "ts-jest/presets/js-with-ts",
testEnvironment: "node"
}
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'node',
},
},
plugins: [
{ plugin: fastRefreshCracoPlugin },
{
plugin: CracoAlias,
options: {