forked from akeneo/pim-community-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-test.config.js
More file actions
28 lines (24 loc) · 839 Bytes
/
webpack-test.config.js
File metadata and controls
28 lines (24 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* eslint-env es6 */
const path = require('path');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const prodConfig = require('./webpack.config.js');
const config = Object.assign({}, prodConfig, {
entry: ['babel-polyfill', path.resolve(__dirname, './tests/front/common/templates/index.js')],
output: {
path: path.resolve('./web/test_dist/'),
publicPath: '/dist/',
filename: '[name].min.js',
chunkFilename: '[name].bundle.js',
},
});
config.plugins.push(
new HtmlWebpackPlugin({
inject: 'head',
template: path.resolve(__dirname, './tests/front/common/templates/index.html'),
minify: {},
inlineSource: '.(js)$',
})
);
config.plugins.push(new HtmlWebpackInlineSourcePlugin());
module.exports = config;