Skip to content

Instantly share code, notes, and snippets.

@PragatiVerma18
Created May 22, 2021 07:53
Show Gist options
  • Select an option

  • Save PragatiVerma18/a92411453f553f335ccd708911a6da16 to your computer and use it in GitHub Desktop.

Select an option

Save PragatiVerma18/a92411453f553f335ccd708911a6da16 to your computer and use it in GitHub Desktop.
The files required for building your first Adobe Photoshop and XD Plugin using VueJS - webpack.config.js contains config settings for webpack
const { VueLoaderPlugin } = require("vue-loader");
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
entry: "./src/main.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "main.js",
libraryTarget: "commonjs2",
},
devtool: "none", // prevent webpack from using eval() on my module
externals: {
uxp: "commonjs2 uxp",
scenegraph: "scenegraph",
os: "commonjs2 os",
},
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
},
{
test: /\.png$/,
exclude: /node_modules/,
loader: "file-loader",
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
},
],
},
plugins: [
new VueLoaderPlugin(),
new CopyPlugin(["plugin"], {
copyUnmodified: true,
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment