-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Description
Bug report
Since 0acff90 compression-webpack-plugin provides it's own types and @types/compression-webpack-plugin has marked as stub.
But it's unable to simply migrate from one to another because types can't be imported in the same way.
Actual Behavior
With compression-webpack-plugin@9.1.1 types can't be imported
import {Rule} from 'compression-webpack-plugin'because
index.ts:1:9 - error TS2305: Module '"compression-webpack-plugin"' has no exported member 'Rule'.
Expected Behavior
Using @types/compression-webpack-plugin@9.0.0 and compression-webpack-plugin@9.1.0 it's possible to write
import {Rule} from 'compression-webpack-plugin'How Do We Reproduce?
yarn init, use defaultsyarn add typescriptyarn tsc --init, use defaultsyarn add webpackyarn add compression-webpack-plugin- Create
index.tsimport {Rule} from 'compression-webpack-plugin'; const a: Rule = 'a'; console.log(a)
yarn tsc
Please paste the results of npx webpack-cli info here, and mention other relevant information
Not related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels