blueprintjs

React test with jest does not honor moduleNameMapper from webpack aliases

折月煮酒 提交于 2020-01-03 16:59:01
问题 I am using jest and enzyme to test my react component. I am also using blueprint icons as one of the dependency in my react component. As part of my webpack config, following is added: config.resolve.alias = { blueprintIcons: path.resolve('./node_modules/@blueprintjs/icons'), blueprint: path.resolve('./node_modules/@blueprintjs/core') }; Following is added as part of jest config: rootDir: '.', roots: [ '<rootDir>/__test__/' ], transformIgnorePatterns: [ '<rootDir>/node_modules/' ], transform:

Why is my webpack trying to load .js files when compiling a .sass file?

人走茶凉 提交于 2019-12-22 10:09:34
问题 I'm trying to use blueprintjs so I followed the tutorial with this line: main.sass @import "~@blueprintjs/core"; However my webpack-dev-server gives me this error log: ERROR in ./node_modules/css-loader?{"minimize":false}!./node_modules/postcss-loader/lib?{"sourceMap":true}!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./app/javascript/packs/main.sass Module build failed: */ ^ Invalid CSS after " */": expected 1 selector or at-rule, was '"use

Initializers are not allowed in ambient contexts error when installing Blueprint

寵の児 提交于 2019-11-27 15:05:34
I'm trying to use the @blueprintjs/core library in my project. However, when I compile my code, I'm getting many errors like this: node_modules/@blueprintjs/core/dist/common/classes.d.ts(4,30): error TS1039: Initializers are not allowed in ambient contexts. What's going on? What am I doing wrong? As of @blueprintjs/core@1.7.0 , Blueprint is now compiled using TypeScript 2.1. With this new version of TypeScript, initializers are added to the emitted typings for constants. So before, a line of the emitted classes.d.ts looked like this: export declare const ACTIVE: string; It now looks like this

Initializers are not allowed in ambient contexts error when installing Blueprint

送分小仙女□ 提交于 2019-11-26 16:59:24
问题 I'm trying to use the @blueprintjs/core library in my project. However, when I compile my code, I'm getting many errors like this: node_modules/@blueprintjs/core/dist/common/classes.d.ts(4,30): error TS1039: Initializers are not allowed in ambient contexts. What's going on? What am I doing wrong? 回答1: As of @blueprintjs/core@1.7.0 , Blueprint is now compiled using TypeScript 2.1. With this new version of TypeScript, initializers are added to the emitted typings for constants. So before, a