2021-09-03 05:42:37 +00:00
|
|
|
const path = require("path");
|
|
|
|
const DtsBundleWebpack = require("dts-bundle-webpack");
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: "production",
|
2022-01-17 14:39:48 +00:00
|
|
|
entry: path.resolve(__dirname, "dist", "index.browser.js"),
|
2021-09-03 05:42:37 +00:00
|
|
|
devtool: "inline-source-map",
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "build"),
|
|
|
|
filename: "nope.js",
|
|
|
|
library: "nope_browser",
|
2021-09-04 11:45:52 +00:00
|
|
|
libraryTarget: "commonjs2",
|
2021-09-03 05:42:37 +00:00
|
|
|
},
|
|
|
|
// resolve: {
|
|
|
|
// fallback: { "os": require.resolve("os-browserify/browser") }
|
|
|
|
// },
|
|
|
|
plugins: [
|
|
|
|
new DtsBundleWebpack({
|
|
|
|
name: "nope_browser",
|
2022-01-17 14:39:48 +00:00
|
|
|
main: path.resolve(__dirname, "dist", "index.browser.d.ts"),
|
2021-09-03 05:42:37 +00:00
|
|
|
baseDir: path.resolve(__dirname),
|
|
|
|
out: path.resolve(__dirname, "build", "nope.d.ts"),
|
|
|
|
// baseDir: path.resolve(__dirname, "dist"),
|
|
|
|
// externals: true,
|
|
|
|
})
|
|
|
|
]
|
|
|
|
};
|