Skip to content

Instantly share code, notes, and snippets.

@MariusBongarts
Created January 30, 2023 06:44
Show Gist options
  • Select an option

  • Save MariusBongarts/a67a94708c1c7510d0c8702cec20815a to your computer and use it in GitHub Desktop.

Select an option

Save MariusBongarts/a67a94708c1c7510d0c8702cec20815a to your computer and use it in GitHub Desktop.
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
entry: "./src/index.tsx",
mode: "production",
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: { noEmit: false },
},
},
],
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
output: {
filename: "app.js",
path: path.resolve(__dirname, "dist"),
},
plugins: [
new CopyPlugin({
patterns: [{ from: "./extension", to: "" }],
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment