Updating webpack configs
This commit is contained in:
@@ -1,10 +1,37 @@
|
||||
const webpack = require('webpack')
|
||||
const path = require('path')
|
||||
const webpack = require("webpack");
|
||||
const path = require("path");
|
||||
const AssetsPlugin = require("assets-webpack-plugin");
|
||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: path.resolve(__dirname, 'src/main.js'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'static/dist')
|
||||
}
|
||||
}
|
||||
mode: "development",
|
||||
devtool: "source-map",
|
||||
entry: path.resolve(__dirname, "src/main.js"),
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.m?js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: "babel-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin({
|
||||
cleanAfterEveryBuildPatterns: ["dist/*"],
|
||||
}),
|
||||
new AssetsPlugin({
|
||||
filename: "assets.json",
|
||||
path: path.resolve(__dirname, "data/panaetius-theme"),
|
||||
prettyPrint: true,
|
||||
fullPath: false,
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
$: "jquery",
|
||||
jquery: "jquery",
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user