Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path');
- const webpack = require('webpack');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- module.exports = {
- context: path.resolve('src'),
- output: {
- path: path.resolve('public'),
- publicPath: '/',
- filename: '[name].bundle.js',
- chunkFilename: '[name].[id].js'
- },
- resolve: {
- root: path.resolve('src'),
- modulesDirectories: [
- 'node_modules'
- ]
- },
- module: {
- loaders: [
- {
- test: /\.pug$/,
- loader: 'pug',
- query: { pretty: true }
- }, {
- test: /\.css$/,
- loader: 'style!css?-minifySelectors'
- }, {
- test: /\.styl$/,
- loader: 'style!css?camelCase&-minifySelectors&localIdentName=[local]___[hash:base64:5]!stylus?resolve url'
- }
- ],
- },
- plugins: [
- new webpack.NoErrorsPlugin(),
- new HtmlWebpackPlugin({
- template: 'pug/main.pug',
- filename: 'main.html',
- inject: false
- })
- ],
- entry: {
- main: 'js/main.js',
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement