123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /**
- * @Author: Bachir Soussi Chiadmi <bach>
- * @Date: 11-04-2017
- * @Email: bachir@figureslibres.io
- * @Last modified by: bach
- * @Last modified time: 16-04-2017
- * @License: GPL-V3
- */
- var webpack = require('webpack');
- var ExtractTextPlugin = require('extract-text-webpack-plugin');
- module.exports = {
- entry: ["./main.js", "./scss/main.scss"], //, "./scss/main.scss"
- output: {
- path: __dirname + "/static",
- filename: "main.js"
- },
- devtool: 'source-map',
- module: {
- rules: [
- /* your other rules for JavaScript transpiling go in here */
- {
- // regular css files
- test: /\.css$/,
- use: ExtractTextPlugin.extract({ loader: 'css-loader?importLoaders=1', }),
- },
- {
- // sass / scss loader for webpack
- test: /\.(sass|scss)$/,
- use: ExtractTextPlugin.extract(['css-loader', 'sass-loader'])
- },
- {
- // fonts
- test: /\.(eot|svg|ttf|woff|woff2)$/,
- use: "file-loader?name=fonts/[name].[ext]"
- },
- ]
- },
- plugins: [
- new ExtractTextPlugin({
- // define where to save the file
- filename: '[name].css', allChunks: true,
- }),
- new webpack.optimize.UglifyJsPlugin({
- compress: {
- warnings: false
- }
- })
- ]
- };
|