Files
Josh Goldberg c459175a2c Converted to eightbittr@0.8.0 - the monorepo (#917)
* Converted internally to eightbittr@0.8.0 - the monorepo

* Well, it compiles now

* Wow, it runs now, amaze - using post-walkthrough version

* Can walk around Pallet Town, but can't interact

* Basically almost TypeScript happy

* Collisions are back to working (weirdly) again

* Registered missing Frames section

* Moved from Travis to CircleCI

* Arbitrary README.md change for CircleCI

* v0.8.0-beta1

* Remove old TSLint things

* Fixed package command references

* Copied over external settings, including prettier

* Update lockfile

* Corrected parserOptions.project, disabled a few rules

* Fixed remaining lint complaints

* Added husky hooks and .github via hydration, and some formatting fixes

* Added rule overrides back

* v0.8.0 stable dependencies
2020-07-12 17:46:28 -04:00

66 lines
1.4 KiB
JavaScript

const { shenanigans } = require("./package.json");
const { loading = {} } = shenanigans;
const getEntriesAndSources = () => {
return (
loading.entries || [
{
entry: `./lib/index.js`,
name: loading.name || shenanigans.name,
},
]
);
};
const getExternals = () => {
const output = {};
if (loading.externals === undefined) {
return output;
}
for (const external of loading.externals) {
output[external.name] = external.name;
}
return output;
};
const entriesAndSources = getEntriesAndSources();
const externals = getExternals();
const entry = {};
for (const pair of entriesAndSources) {
entry[pair.name] = pair.entry;
}
module.exports = {
entry,
externals,
mode: "production",
module: {
rules: [
{
test: /\.(tsx?)|(jsx?)$/,
exclude: /node_modules/,
use: {
loader: require.resolve("babel-loader"),
options: {
rootMode: "upward-optional",
},
},
},
],
},
output: {
filename: `[name].js`,
libraryTarget: "amd",
publicPath: "dist/",
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".json"],
symlinks: true,
},
};