Created
January 13, 2020 20:53
-
-
Save qasimalyas/b6418adee6edf87cb5b8bc9a484e8ed3 to your computer and use it in GitHub Desktop.
webpack config
This file contains 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 path = require("path"); | |
const webpack = require("webpack"); | |
console.log(path.resolve(__dirname, "./Javascript/destnew")); | |
module.exports = { | |
mode: "development", | |
entry: { | |
main: "./Javascript/index.js" | |
}, | |
output: { | |
path: path.resolve(__dirname, "Javascript/destnew"), | |
filename: "[name].js", | |
publicPath: "/Javascript/destnew/", | |
chunkFilename: "[name]-bundle.js" | |
}, | |
devtool: "cheap-module-eval-source-map", | |
module: { | |
rules: [{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }] | |
}, | |
resolve: { | |
modules: ["node_modules", path.resolve(__dirname, "./Javascript/")] | |
}, | |
externals: { | |
jquery: "jQuery" | |
}, | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
$: "jquery", | |
jQuery: "jquery" | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment