Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fs = require('fs');
- const path = require('path');
- const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
- const CopyWebpackPlugin = require('copy-webpack-plugin');
- const { GlobCopyWebpackPlugin } = require('@angular/cli/plugins/webpack'); // eslint-disable-line no-unused-vars
- const ProgressPlugin = require('webpack/lib/ProgressPlugin');
- const CircularDependencyPlugin = require('circular-dependency-plugin');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- const ExtractTextPlugin = require('extract-text-webpack-plugin');
- const rxPaths = require('rxjs/_esm5/path-mapping');
- const autoprefixer = require('autoprefixer');
- const cssnano = require('cssnano');
- const { NoEmitOnErrorsPlugin, HashedModuleIdsPlugin, EnvironmentPlugin, ProvidePlugin } = require('webpack');
- const { BaseHrefWebpackPlugin, SuppressExtractedTextChunksWebpackPlugin } = require('@angular/cli/plugins/webpack');
- const { CommonsChunkPlugin, ModuleConcatenationPlugin } = require('webpack').optimize;
- const { PurifyPlugin } = require('@angular-devkit/build-optimizer');
- const { AngularCompilerPlugin } = require('@ngtools/webpack');
- const nodeModules = path.join(process.cwd(), 'node_modules');
- const realNodeModules = fs.realpathSync(nodeModules);
- const genDirNodeModules = path.join(process.cwd(), 'src', '$$_gendir', 'node_modules');
- const entryPoints = ["inline", "polyfills", "sw-register", "styles", "vendor", "main", "shop-builder"];
- const minimizeCss = true;
- const baseHref = "";
- const deployUrl = "";
- const projectRoot = process.cwd();
- const maximumInlineSize = 10;
- module.exports = {
- "resolve": {
- "extensions": [
- ".ts",
- ".js"
- ],
- "modules": [
- "node_modules"
- ],
- "symlinks": true,
- "alias": Object.assign({
- '@simplicity': path.resolve(process.cwd(), "app"),
- }, rxPaths()),
- "mainFields": [
- "browser",
- "module",
- "core-ts"
- ]
- },
- devtool: 'source-map',
- "resolveLoader": {
- "modules": [
- "node_modules"
- ],
- "alias": Object.assign({
- '@simplicity': path.resolve(process.cwd(), "app"),
- }, rxPaths()),
- },
- "entry": {
- "core-ts": [
- path.join(process.cwd(), 'grunt/lib/compose-core-typescript')
- ],
- },
- "output": {
- "path": path.join(process.cwd(), "build/simplicity/assets/js/"),
- "filename": "[name].js",
- "chunkFilename": "[id].chunk.js",
- "crossOriginLoading": false,
- "publicPath": "/"
- },
- "module": {
- "rules": [
- {
- "test": /\.html$/,
- "loader": "raw-loader"
- },
- {
- "test": /\.(eot|svg|cur)$/,
- "loader": "file-loader",
- "options": {
- "name": "[name].[hash:20].[ext]",
- "limit": 10000
- }
- },
- {
- "test": /\.(jpg|png|webp|gif|otf|ttf|woff|woff2|ani)$/,
- "loader": "url-loader",
- "options": {
- "name": "[name].[hash:20].[ext]",
- "limit": 10000
- }
- },
- {
- "test": /\.js$/,
- "use": [
- {
- "loader": "@angular-devkit/build-optimizer/webpack-loader",
- "options": {
- "sourceMap": true
- }
- }
- ]
- },
- {
- "test": /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
- "use": [
- {
- "loader": "@angular-devkit/build-optimizer/webpack-loader",
- "options": {
- "sourceMap": true
- }
- },
- "@ngtools/webpack"
- ]
- }
- ]
- },
- "plugins": [
- new EnvironmentPlugin({
- "NODE_ENV": "development"
- }),
- /*new ProvidePlugin({
- jQuery: 'jquery/src/jquery',
- $: 'jquery/src/jquery',
- jquery: 'jquery/src/jquery'
- }),*/
- new NoEmitOnErrorsPlugin(),
- /*new GlobCopyWebpackPlugin({
- "patterns": [
- "config"
- ],
- "globOptions": {
- "cwd": "app/components",
- "dot": true,
- "ignore": ".gitkeep",
- "output": path.join(process.cwd(), "build/simplicity/apps/config")
- }
- }),*/
- new ProgressPlugin(),
- new AngularCompilerPlugin({
- "entryModule": 'grunt/lib/compose-core-typescript',
- "platform": 0,
- "sourceMap": true,
- "tsConfigPath": path.join(process.cwd(), "grunt/config/tsconfig.core.json"),
- "compilerOptions": {}
- })
- ],
- "node": {
- "fs": "empty",
- "global": true,
- "crypto": "empty",
- "tls": "empty",
- "net": "empty",
- "process": true,
- "module": false,
- "clearImmediate": false,
- "setImmediate": false
- },
- "devServer": {
- "historyApiFallback": true
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement