2017-03-31 18:21:41 +00:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
|
|
|
|
|
|
const rootDir = path.resolve(__dirname, '../../../');
|
|
|
|
|
2020-11-11 08:48:04 +00:00
|
|
|
module.exports = {
|
|
|
|
entry: {
|
|
|
|
material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
|
|
|
|
public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'),
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(rootDir, 'web/wallassets'),
|
|
|
|
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,
|
|
|
|
context: 'app/Resources/static/themes',
|
|
|
|
files: '**/*.scss',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
jquery: path.join(rootDir, '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
|
|
|
};
|