2017-03-31 20:21:41 +02:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
|
|
|
|
|
|
const rootDir = path.resolve(__dirname, '../../../');
|
|
|
|
|
2017-06-20 07:14:04 +02:00
|
|
|
module.exports = function () {
|
2017-03-31 20:21:41 +02:00
|
|
|
return {
|
|
|
|
entry: {
|
|
|
|
material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
|
|
|
|
baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'),
|
2017-06-22 12:15:24 +02:00
|
|
|
public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'),
|
2017-03-31 20:21:41 +02:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
filename: '[name].js',
|
2017-10-24 00:15:52 +02:00
|
|
|
path: path.resolve(rootDir, 'web/wallassets'),
|
2017-12-20 21:53:11 +01:00
|
|
|
publicPath: '',
|
2017-03-31 20:21:41 +02:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
$: 'jquery',
|
|
|
|
jQuery: 'jquery',
|
|
|
|
'window.$': 'jquery',
|
2017-06-20 07:14:04 +02:00
|
|
|
'window.jQuery': 'jquery',
|
2017-03-31 20:21:41 +02:00
|
|
|
}),
|
|
|
|
new StyleLintPlugin({
|
|
|
|
configFile: '.stylelintrc',
|
|
|
|
failOnError: false,
|
|
|
|
quiet: false,
|
|
|
|
context: 'app/Resources/static/themes',
|
|
|
|
files: '**/*.scss',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
2017-06-20 07:14:04 +02:00
|
|
|
jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'),
|
|
|
|
},
|
2017-03-31 20:21:41 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|