menu
Logo
  • Why azing?
  • Blog
  • Help
ENarrow_drop_down
  • DE
  • EN
Suche in Checklisten
search
azing Logo ENarrow_drop_down
  • DE
  • EN
  • Why azing?
  • Help
2sxc
drive_folder_upload
  • homeChecklist Templates
  • south
  • fiber_manual_recordZ: Internal Stuff for the 2sxc-Dev Team
  • south

folder_sharedZ: Internal Stuff for the 2sxc-Dev Team

  • homeChecklist Templates
  • south
  • fiber_manual_recordZ: Internal Stuff for the 2sxc-Dev Team
  • south

folder_sharedZ: Internal Stuff for the 2sxc-Dev Team

Folders and checklists

  • folder_sharedApp Auto-Installation Manager on 2sxc.org
  • folder_sharedContent App
  • folder_sharedDevelop Standard Apps
  • folder_sharedDocumentation
  • folder_sharedExtension: dnn-sxc-angular (NPM)
  • folder_sharedExternal Dependencies
  • folder_sharedFeatures Management
  • folder_sharedGlobal Content and Input Types
  • folder_sharedIntegration with Other Platforms
  • folder_sharedLicensing
  • folder_sharedOqtane
  • folder_sharedPart: Code Editor and Snippets
  • folder_sharedReleases of 2sxc
  • folder_sharedSetup Dev Environment
  • folder_sharedTesting 2sxc
  • folder_sharedTesting: Edit UI
  • folder_sharedThemes
  • folder_sharedTutorials - Creation and Maintenance
  • folder_sharedUI - Main
  • check_circleAdd SVG into inline HTML
  • check_circleFeature - Create and Complete
  • check_circleUpdate Webpack 4 -> 5

Parts (0) expand_more

These are small document-parts which are used in other documents. They are not a starting point for any real activity. Because of this, they will be listed further down and the search will not list them unless requested. 

const path = require('path');
const webpack = require('webpack');
const FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries");
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = (env) => {
return {
  entry: {
    styles: `./${env.style}/styles/${env.style}.scss`,      
    scripts: './src/ts/index.ts',
  },
  output: {
    path: path.resolve(__dirname, `${env.style}/dist`),
    filename: '[name].min.js',
    assetModuleFilename: 'images/[hash][ext][query]'
  },
  mode: 'production',
  devtool: 'source-map',
  watch: true,
  stats: {
    warnings: false,
    cachedModules: false,
    groupModulesByCacheStatus: false
  },
  cache: {
    type: 'filesystem',
    cacheDirectory: path.resolve(__dirname, '.temp_cache'),
    compression: 'gzip',
  },
  resolve: {
    extensions: ['.ts', '.tsx', '.js', '.scss']
  },
  plugins: [
    new FixStyleOnlyEntriesPlugin(),
    new MiniCssExtractPlugin({
      filename: '[name].min.css',
    }),
    new webpack.ProgressPlugin(),
  ],
  module: {
    rules: [
      {
        test: /\.tsx?$/,
          use: [

          {
            loader: 'ts-loader',
            options: {
              transpileOnly: true,
            },
          },
        ],
        exclude: /node_modules/,
      }, {
        test: /\.s[ac]ss$/i,
        use: [
          MiniCssExtractPlugin.loader,
          {
            loader: "css-loader",
            options: {
              sourceMap: true
            },
          }, {
            loader: 'postcss-loader',
            options: {
              sourceMap: true,
              postcssOptions: {
                plugins: function () {
                  return [
                    require('autoprefixer')
                  ];
                }
              }
            }
          }, {
            loader: "sass-loader",
            options: {
              sourceMap: true
            },
          }
        ],
      }
    ],
  },
}
};
new webpack.ProgressPlugin((percentage, message) => {
console.log(`${(percentage * 100).toFixed()}% ${message}`);
})

 

Logo
Legal | Content Copyright CC-BY 4.0
bug_reportReport Bug
  • info
  • Links
  • Permissions
code Share
code
URL copied to clipboard.
Embed Checklist close
Copy Copy
Content Copyright

CC-BY 4.0

Translations

None

2sxc - Content Management for DNN & Oqtane Logo

2sxc - Content Management for DNN & Oqtane

QR-Code
azing.org/2sxc/r/qYqX9VoZ
View & Use

Public (can be used by everybody)

Edit & Admin

Default (all members can edit)

This catalog has a simple permission model, where all members have the same permissions. For advanced permissions, upgrade to Enterprise.

Here you can see how this document is used and linked by other documents

Used in (1)

Others referencing this

  1. Update Webpack 4 -> 5
Uses these (0)

Documents linked from this document

How it Behaves

How this document is categorized changes how it behaves.

This is a partial document. It is listed below the normal documents, and is hidden in the default search.

It belongs to Update Webpack 4 -> 5

Type

This is a Template (Boilerplate). It's used for text snippets to copy/paste.

Get something to say?

Comment to start a discussion or make a note
send

please log on to chat

close

Durchsuche ganz Azing