-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (34 loc) · 961 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
35 lines (34 loc) · 961 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
29
30
31
32
33
34
35
/* eslint-disable no-var */
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
module.exports = {
output: {
publicPath: '/',
libraryTarget: 'commonjs2', // necessary for the babel plugin
path: path.join(__dirname, 'lib-css'), // where to place webpack files
},
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader?modules&importLoaders=1&localIdentName=draftJsKatexPlugin__[local]__[hash:base64:5]!postcss-loader'
}),
},
],
},
plugins: [
new ExtractTextPlugin(`${path.parse(process.argv[2]).name}.css`),
new webpack.LoaderOptionsPlugin({
options: {
context: __dirname,
postcss: [
autoprefixer({ browsers: ['> 1%'] })
]
}
})
],
};