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
4747
4848## Usage
4949
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 ` :
5160
5261``` js
5362const ResolveTypeScriptPlugin = require (" resolve-typescript-plugin" ).default ;
@@ -71,6 +80,13 @@ exports = {
7180You will also need to have [ ts-loader] [ 4 ] (or another TypeScript loader)
7281installed and configured.
7382
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+
7490## Feedback
7591
7692We're seeking [ community feedback] [ 5 ] on this plugin.
You can’t perform that action at this time.
0 commit comments