]>
Commit | Line | Data |
---|---|---|
64f81bc3 TC |
1 | const path = require('path'); |
2 | const webpack = require('webpack'); | |
3 | const StyleLintPlugin = require('stylelint-webpack-plugin'); | |
4 | ||
5 | const rootDir = path.resolve(__dirname, '../../../'); | |
6 | ||
789c4682 | 7 | module.exports = function () { |
64f81bc3 TC |
8 | return { |
9 | entry: { | |
10 | material: path.join(rootDir, './app/Resources/static/themes/material/index.js'), | |
11 | baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'), | |
77255d66 | 12 | public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'), |
64f81bc3 | 13 | }, |
64f81bc3 TC |
14 | output: { |
15 | filename: '[name].js', | |
9ff628ca | 16 | path: path.resolve(rootDir, 'web/wallassets'), |
e8694faa | 17 | publicPath: '', |
64f81bc3 TC |
18 | }, |
19 | plugins: [ | |
20 | new webpack.ProvidePlugin({ | |
21 | $: 'jquery', | |
22 | jQuery: 'jquery', | |
23 | 'window.$': 'jquery', | |
789c4682 | 24 | 'window.jQuery': 'jquery', |
64f81bc3 TC |
25 | }), |
26 | new StyleLintPlugin({ | |
27 | configFile: '.stylelintrc', | |
28 | failOnError: false, | |
29 | quiet: false, | |
30 | context: 'app/Resources/static/themes', | |
31 | files: '**/*.scss', | |
32 | }), | |
33 | ], | |
34 | resolve: { | |
35 | alias: { | |
789c4682 JB |
36 | jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'), |
37 | }, | |
64f81bc3 TC |
38 | }, |
39 | }; | |
40 | }; |