forked from ringcentral/ringcentral-js-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
54 lines (53 loc) · 1.39 KB
/
Copy pathwebpack.config.js
File metadata and controls
54 lines (53 loc) · 1.39 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const path = require('path');
const autoprefixer = require('autoprefixer');
const pcssImport = require('postcss-import');
const pcssNested = require('postcss-nested');
const pcssVar = require('postcss-simple-vars');
const pcssMixins = require('postcss-mixins');
module.exports = {
entry: {
'standalone.js': path.resolve(__dirname, 'demo/applications/standalone/index.js'),
'showcase.js': path.resolve(__dirname, 'demo/applications/showcase/index.js'),
},
output: {
path: path.resolve(__dirname, 'demo/dist/applications'),
filename: '[name]',
libraryTarget: 'umd',
library: 'widgets',
},
devtool: 'inline-source-map',
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel'],
exclude: /node_modules/,
},
{
test: /\.json$/i,
loader: 'json',
},
{
test: /\.css$/,
loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[folder]__[local]!postcss-loader',
},
{
test: /\.(ogg|ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,
loader: 'file-loader',
},
{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' },
],
},
postcss(webpack) {
return [
pcssImport({
addDependencyTo: webpack,
path: ['src/styles'],
}),
pcssMixins,
pcssVar,
pcssNested,
autoprefixer,
];
},
};