forked from clojure/clojurescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLJS-2592: :npm-deps using ES6 modules with .mjs extensions are not d…
…etected correctly This adds a new :package-json-resolution option that can be used to control which package.json entry fields are considered during JS module resolution. When set, this flag will override the entries that would otherwise be picked for the configured target. The resulting behavior: {:target :nodejs} => ("module", "main") {:target :browser} => ("browser", "module", "main") {:target <any> :package-json-resolution :browser} => ("browser", "main") {:target <any> :package-json-resolution :nodejs} => ("main") This allows to import packages like graphql and iterall via :npm-deps, which currently point their "module" entries to unsupported .mjs files.
- Loading branch information
Jannis Pohlmann
committed
Mar 9, 2018
1 parent
e714713
commit 43f2fac
Showing
5 changed files
with
132 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(ns package-json-resolution-test.core | ||
(:require [iterall] | ||
[graphql])) | ||
|
||
(enable-console-print!) | ||
|
||
(println "Is collection:" (iterall/isCollection #js [1 2])) | ||
(println "GraphQL:" graphql) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters