2017-03-31 18:21:41 +00:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
|
|
|
2023-08-07 21:22:35 +00:00
|
|
|
const projectDir = path.resolve(__dirname, '../../../');
|
2017-03-31 18:21:41 +00:00
|
|
|
|
2020-11-11 08:48:04 +00:00
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2024-02-24 22:54:36 +00:00
|
|
|
material: path.join(projectDir, './assets/material/index.js'),
|
|
|
|
public: path.join(projectDir, './assets/_global/share.js'),
|
2020-11-11 08:48:04 +00:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
2023-08-07 21:22:35 +00:00
|
|
|
path: path.resolve(projectDir, 'web/wallassets'),
|
2020-11-11 08:48:04 +00:00
|
|
|
publicPath: '',
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
$: 'jquery',
|
|
|
|
jQuery: 'jquery',
|
|
|
|
'window.$': 'jquery',
|
|
|
|
'window.jQuery': 'jquery',
|
|
|
|
}),
|
|
|
|
new StyleLintPlugin({
|
2022-01-05 19:43:36 +00:00
|
|
|
configFile: 'stylelint.config.js',
|
2020-11-11 08:48:04 +00:00
|
|
|
failOnError: false,
|
|
|
|
quiet: false,
|
2024-02-24 22:54:36 +00:00
|
|
|
context: 'assets',
|
2020-11-11 08:48:04 +00:00
|
|
|
files: '**/*.scss',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2023-08-07 21:22:35 +00:00
|
|
|
jquery: path.join(projectDir, 'node_modules/jquery/dist/jquery.js'),
|
2017-03-31 18:21:41 +00:00
|
|
|
},
|
2020-11-11 08:48:04 +00:00
|
|
|
},
|
2017-03-31 18:21:41 +00:00
|
|
|
};
|