Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么Rollup会为我的Angular应用程序包创建Facade块,以及如何修复它?_Javascript_Angular_Bazel_Rollup - Fatal编程技术网

Javascript 为什么Rollup会为我的Angular应用程序包创建Facade块,以及如何修复它?

Javascript 为什么Rollup会为我的Angular应用程序包创建Facade块,以及如何修复它?,javascript,angular,bazel,rollup,Javascript,Angular,Bazel,Rollup,我有一个包,我在Rollup和Bazel的帮助下创建了我的包。因此,我有一个rollup\u bundle规则,如下所示: 以下是我正在使用的: const node = require('rollup-plugin-node-resolve'); const commonjs = require('rollup-plugin-commonjs'); module.exports = { plugins: [ node({ mainFields: ['browser',

我有一个包,我在Rollup和Bazel的帮助下创建了我的包。因此,我有一个
rollup\u bundle
规则,如下所示:

以下是我正在使用的:

const node = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');

module.exports = {
  plugins: [
    node({
      mainFields: ['browser', 'es2015', 'module', 'jsnext:main', 'main'],
    }),
    commonjs(),
  ],
  onwarn: function (warning) {
    if (warning.code === 'THIS_IS_UNDEFINED') {
      return;
    }
    console.warn(warning.message);
  },
};
但在捆绑过程中,我收到一条消息,告诉我,汇总创建了一个facade块。因此,我有一个看似冗余的javascript文件

INFO: From Bundling JavaScript services/client/bundle [rollup]:

bazel-out/k8-fastbuild/bin/services/client/main.prod.mjs → bazel-out/k8-fastbuild/bin/services/client/bundle...
To preserve the export signature of the entry module "bazel-out/k8-fastbuild/bin/services/client/main.prod.mjs", an empty facade chunk was created. This often ha
ppens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySi
gnatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.
created bazel-out/k8-fastbuild/bin/services/client/bundle in 2.9s
INFO: From Bundling JavaScript services/client/bundle [rollup] [for host]:

bazel-out/host/bin/services/client/main.prod.mjs → bazel-out/host/bin/services/client/bundle...
To preserve the export signature of the entry module "bazel-out/host/bin/services/client/main.prod.mjs", an empty facade chunk was created. This often happens wh
en creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySignatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.
created bazel-out/host/bin/services/client/bundle in 3s
这是我的应用程序的目录结构

assets
app
shared
environment
features
  login
    store
  user
    store
  ideas
    store
store

但我认为,为了找到根本原因,我们必须查看实际的源文件:

嗨,我在尝试sapper的demo starter应用程序时遇到了类似的问题。我发现设置为false使错误消失。这有用吗?@RichS Mh有趣。错误消失了!但我仍然有一个javascript包,其中只有一行代码:
import“/main.prod-be1afaae.js”不确定这是否是一个问题,但它似乎工作@RichS刚刚遇到了一个问题。似乎我还没有清除我的缓存或其他东西。但是现在我在浏览器中遇到了这个错误:
error:inject()必须从注入上下文调用。这可能是一个角度问题好的,这有帮助吗。我不熟悉最新的天使。我最后一次使用的angularjs是v1(angularjs)。嗨,我在尝试sapper的demo starter应用程序时遇到了类似的问题。我发现设置为false使错误消失。这有用吗?@RichS Mh有趣。错误消失了!但我仍然有一个javascript包,其中只有一行代码:
import“/main.prod-be1afaae.js”不确定这是否是一个问题,但它似乎工作@RichS刚刚遇到了一个问题。似乎我还没有清除我的缓存或其他东西。但是现在我在浏览器中遇到了这个错误:
error:inject()必须从注入上下文调用。这可能是一个角度问题好的,这有帮助吗。我不熟悉最新的天使。我最后使用的角度是v1(angularjs)。
assets
app
shared
environment
features
  login
    store
  user
    store
  ideas
    store
store