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