vtex-cms-template-atualizad.../webpack/webpack.common.js

34 lines
828 B
JavaScript
Raw Normal View History

2022-12-05 13:22:58 +00:00
const webpack = require("webpack");
const path = require("path");
var shopName = require("../package.json").shopName;
/**
* Configuração do webpack
*/
const isProd = process.env.NODE_ENV === "production";
module.exports = {
entry: {
main: "./src/arquivos/js/main.js",
checkout: "./src/arquivos/js/checkout.js",
},
output: {
path: path.resolve(__dirname, "..", "dist/arquivos"),
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",
}),
],
};