Rename project and fix sourcemap collision

This commit is contained in:
Tyler Hallada 2022-03-23 18:56:49 -04:00
parent 9e9296eec6
commit d67e75af4a
2 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"name": "modmapper-integration",
"name": "vortex-modmapper-integration",
"version": "0.0.1",
"description": "Allow mods and plugins to be opened with ModMapper",
"description": "Allow mods and plugins to be opened with Modmapper",
"main": "./dist/index.js",
"scripts": {
"webpack": "node ./node_modules/webpack/bin/webpack --config webpack.config.js --display-error-details --progress --profile --color",

View File

@ -1,16 +1,18 @@
let webpack = require('vortex-api/bin/webpack').default;
const WebpackDynamicPublicPathPlugin = require("webpack-dynamic-public-path");
const config = webpack('modmapper-integration', __dirname, 4);
const config = webpack('vortex-modmapper-integration', __dirname, 4);
config.resolve.extensions.push(".wasm");
config.entry = { app: "./src/index.ts" };
config.entry = { "vortex-modmapper-integration": "./src/index.ts" };
config.output.publicPath = "publicPathPlaceholder";
// hack to get webpack to load chunks and wasm from the vortex extension directory
config.plugins.push(new WebpackDynamicPublicPathPlugin({
externalPublicPath: `"file:///" + __dirname + "/"`,
chunkNames: ["app"],
chunkNames: ["vortex-modmapper-integration"],
}));
config.output.sourceMapFilename = `[name].js.map`
module.exports = config;