Created
May 22, 2021 07:53
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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