_评论由:jumblemuddle_ 发布
这可能是独立的问题,但是当 npm 模块使用 `process.env.NODE_ENV` 时似乎存在问题。
{code:|title=使用快照 `closure-compiler-unshaded` 启动 REPL}
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.339"} com.google.javascript/closure-compiler-unshaded {:mvn/version "1.0-SNAPSHOT"}}}' -m cljs.main -co '{:npm-deps {"emotion" "9.2.4"} :install-deps true :repl-verbose true}' -d out -r
ClojureScript 1.10.339
cljs.user=> (require '[emotion])
加载命名空间 module$home$garrett$tmp$node-modules$emotion$dist$index-es ,编译: ([module$home$garrett$tmp$node-modules$$emotion$unitless$dist$index-es module$$emotion$unitless module$$emotion$unitless$dist$index-es] [module$home$garrett$$ ...
goog.addDependency("../node_modules/@emotion/unitless/dist/index.es.js", ['module$home$garrett$$ ...
goog.addDependency("../node_modules/@emotion/hash/dist/index.es.js", ['module$home$garrett$$ ...
goog.addDependency("../node_modules/@emotion/stylis/dist/index.es.js", ['module$home$garrett$$ ...
goog.addDependency("../node_modules/stylis-rule-sheet/index.js", ['module$home$garrett$$ ...
goog.addDependency("../node_modules/create-emotion/dist/index.es.js", ['module$home$garrett$tmp$node_modules$create_emotion$dist$index_es', 'module$create_emotion', 'module$create_emotion$dist$index_es'], ['module$$emotion$memoize', 'module$$emotion$unitless', 'module$$emotion$hash', 'module$$emotion$stylis', 'module$stylis_rule_sheet']);
goog.addDependency("../node_modules/@emotion/memoize/dist/index.es.js", ['module$home$garrett$tmp$node_modules$$emotion$memoize$dist$index_es', 'module$$emotion$memoize', 'module$$emotion$memoize$dist$index_es'], []);
goog.addDependency("../node_modules/emotion/dist/index.es.js", ['module$home$garrett$tmp$node_modules$emotion$dist$index_es', 'module$emotion', 'module$emotion$dist$index_es'], ['module$create_emotion']);
goog.require('module$home$garrett$tmp$node_modules$emotion$dist$index_es');
null;
{code:title=浏览器控制台错误}
index.es.js:11 未捕获的引用错误: process 未定义
在 index.es.js:11
(匿名函数) @ index.es.js:11
index.es.js:5 未捕获的类型错误: module$home$garrett пох установленный компонент$create_emotion dist index_esНе является функцией
在 index.es.js:5