Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken output with json and several entry points #413

Closed
zmitry opened this issue Sep 25, 2020 · 1 comment
Closed

Broken output with json and several entry points #413

zmitry opened this issue Sep 25, 2020 · 1 comment

Comments

@zmitry
Copy link

zmitry commented Sep 25, 2020

If we are using two entry points which rely on the same json then resulting json is broken.
// a.js

import data from "assets/content-attributes/PredefinedContentControlLists.json";
console.log("data: ", data);

export { data };

// b.js

import data from "assets/content-attributes/PredefinedContentControlLists.json";
console.log("data: ", data);

export { data };

config

const config = {
  entryPoints: ["./src/index.rep.js", "./src/t.js"],
  minify: false,
  define: {
    "process.env.NODE_ENV": '"development"'
  },
  outdir: "./dist",
  bundle: true,
  target: "es2018",
  format: "esm",
  sourcemap: "external",
  loader: {
    ".js": "jsx",
    ".css": "file",
    ".json": "json"
  }
};

It's okay with splitting: true

@evanw
Copy link
Owner

evanw commented Sep 26, 2020

Wow that's no good. I'll start on a fix.

@evanw evanw closed this as completed in c317ef8 Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants