1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
- const path = require('path');
- module.exports = {
- entry: './raw.css',
- output: {
- filename: 'index.js',
- path: path.resolve(__dirname, 'style')
- },
- plugins: [
- new MiniCssExtractPlugin({
- filename: 'index.css'
- })
- ],
- module: {
- rules: [
- {
- test: /\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- hmr: process.env.NODE_ENV === 'development'
- }
- },
- 'css-loader'
- ]
- },
- {
- test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
- use: 'url-loader'
- },
- /* Use null-loader to drop resources that are not used in the CSS */
- {
- test: /\.(jpg|png|gif)$/,
- use: 'null-loader'
- },
- {
- test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
- use: 'null-loader'
- },
- {
- test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
- use: 'null-loader'
- },
- {
- test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
- use: 'null-loader'
- },
- {
- test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
- use: 'null-loader'
- }
- ]
- }
- };
|