File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,16 @@ yarn add --dev resolve-typescript-plugin
47
47
48
48
## Usage
49
49
50
- Configure webpack something like this:
50
+ Include the following in ` package.json ` to configure your project to be an ES
51
+ Module:
52
+
53
+ ``` json
54
+ {
55
+ "type" : " module"
56
+ }
57
+ ```
58
+
59
+ Include something like the following in ` webpack.config.js ` :
51
60
52
61
``` js
53
62
const ResolveTypeScriptPlugin = require (" resolve-typescript-plugin" ).default ;
@@ -71,6 +80,13 @@ exports = {
71
80
You will also need to have [ ts-loader] [ 4 ] (or another TypeScript loader)
72
81
installed and configured.
73
82
83
+ The ` resolve.fullySpecified ` option configures webpack to require file
84
+ extensions except when importing external modules by name. This is consistent
85
+ with node's implementation of ES Modules.
86
+
87
+ If you set ` resolve.fullySpecified ` you should also delete the
88
+ ` resolve.extensions ` option, if any.
89
+
74
90
## Feedback
75
91
76
92
We're seeking [ community feedback] [ 5 ] on this plugin.
You can’t perform that action at this time.
0 commit comments