m3-academy-template-checkou.../checkout/webpack.common.js

32 lines
892 B
JavaScript
Raw Normal View History

2022-12-05 18:23:46 +00:00
const webpack = require("webpack");
const path = require("path");
// var shopName = require("../package.json").name;
/**
* Configuração do webpack
*/
module.exports = {
entry: {
checkout: "./src/arquivos/js/checkout.js",
},
output: {
path: path.resolve(__dirname, "./dist/arquivos"),
filename: "[name]-bundle.js",
// filename: shopName + "--[name]-bundle.js",
},
resolve: {
alias: {
Helpers: path.resolve(__dirname, "..", "src/arquivos/js/helpers"),
Lib: path.resolve(__dirname, "..", "src/arquivos/js/lib"),
Config: path.resolve(__dirname, "..", "src/arquivos/js/config"),
App: path.resolve(__dirname, "..", "src/arquivos/js/app"),
},
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
}),
],
};