We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin doesn't generate a standalone JavaScript file.
Plugin should create a standalone JavaScript file.
Here is my webpack.config.js:
/** * Autor: Andre Sieverding * Copyright © 2019 */ const path = require('path') const fs = require('fs') const webpack = require('webpack') const nodeExternals = require('webpack-node-externals') const MiniCssExtractPlugin = require('mini-css-extract-plugin') const ObsoleteWebpackPlugin = require('obsolete-webpack-plugin') // Get app configurations var config = fs.readFileSync('config.json') config = JSON.parse(config) // Get node environment const { NODE_ENV } = process.env const isDev = NODE_ENV === 'development' const env = isDev ? 'development' : 'production' // Define webpack rules const markoRule = { test: /\.marko?$/, loader: '@marko/webpack/loader' } const styleRule = { test: /\.(sass|scss|css)$/, use: [ 'style-loader', 'css-loader', 'sass-loader' ] } const vectorRule = { test: /\.svg/, loader: 'svg-url-loader' } const imageRule = { test: /\.(jpg|jpeg|gif|png|ico)$/, use: [ { loader: 'file-loader', options: { name: 'images/[name]-[hash:8].[ext]' } } ] } const fontRule = { test: /\.(woff|woff2|ttf|eot)$/, use: [ { loader: 'file-loader', options: { name: 'webfonts/[name]-[hash:8].[ext]' } } ] } // Webpack config for browser const client = { name: 'Client', mode: env, entry: { app: isDev ? [ 'webpack-hot-middleware/client?reload=true', './app/client.js' ]: ['./app/client.js'] }, output: { filename: '[name].js', path: path.resolve(__dirname, 'dist'), publicPath: config.path + '/assets/' }, devServer: isDev ? { contentBase: path.join(__dirname, 'dist'), historyApiFallback: true, overlay: true, hot: true, stats: 'minimal', } : undefined, devtool: isDev ? 'source-map' : undefined, resolve: { extensions: ['.js', '.json', '.marko'] }, module: { rules: [markoRule, styleRule, vectorRule, imageRule, fontRule] }, plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), new MiniCssExtractPlugin({ filename: '[name].css' }), new ObsoleteWebpackPlugin({ name: 'outdatedBrowser', promptOnNonTargetBrowser: true, template: '<div id="outdated"><h6>Dein Browser ist veraltet!</h6><p>Aktualisiere deinen Browser um diese Webanwendung zu verwenden. <a id="btnUpdateBrowser" href="http://fsg-vm-sccm/CMApplicationCatalog/#/SoftwareLibrary/AppListPageView.xaml">Browser jetzt updaten</a></p><p class="last"><a id="obsoleteClose" href="#" title="Schließen">×</a></p></div>' }), isDev && new webpack.HotModuleReplacementPlugin() ].filter(Boolean) } // Webpack config for server const server = { name: 'Server', mode: env, target: 'node', externals: nodeExternals(), entry: { server: ['./app/server.js'] }, output: { filename: '[name].js', path: path.resolve(__dirname, 'dist'), }, resolve: { extensions: ['.js', '.json', '.marko'] }, module: { rules: [markoRule, vectorRule, imageRule] } } module.exports = [ server, client ]
The text was updated successfully, but these errors were encountered:
Webpack is generating the following files:
Sorry, something went wrong.
Looks like the package hasn't been supported anymore. We have an improved/refactored version for webpack 5: https://github.com/AndrushkevichMikita/webpack-obsolete-plugin
No branches or pull requests
Environment
Current Behavior
Plugin doesn't generate a standalone JavaScript file.
Expected Behavior
Plugin should create a standalone JavaScript file.
Detailed Description
Here is my webpack.config.js:
The text was updated successfully, but these errors were encountered: