New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@epinova/webpack

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epinova/webpack - npm Package Compare versions

Comparing version 1.4.1-rc4 to 1.4.1

@@ -53,3 +53,3 @@ {

},
"version": "1.4.1-rc4"
"version": "1.4.1"
}

@@ -5,4 +5,11 @@ # @epinova/webpack

## Usage
# Table of Contents
1. [Usage](#usage)
2. [HTTPS](#https)
3. [Examples](#examples)
4. [Upgrade](#upgrade)
# Usage
`webpack.config.js`

@@ -43,2 +50,53 @@

## TypeScript
```javascript
const path = require('path');
const epinovaWebpackConfig = require('@epinova/webpack');
const addTypeScript = require('@epinova/webpack/typescript');
module.exports = epinovaWebpackConfig(
{ path: 'wwwroot/dist', publicPath: '/dist/', https: true },
(config, env, argv) => {
config.name = 'Client';
config.entry = './Scripts/global/index.js';
addTypeScript(config, {
configFile: path.resolve(__dirname, 'tsconfig.json'),
});
return config;
}
);
```
## Dynamic Bundling
This will automatically add all files that ends with `.bundle.json` as entries to the webpack config so that you don't have to manually update entries for each new bundle. The second argument to the `addDynamicBundles` will define which folders to scan for these bundle json files.
```javascript
const path = require('path');
const epinovaWebpackConfig = require('@epinova/webpack');
const addDynamicBundles = require('@epinova/webpack/dynamic-bundles');
module.exports = epinovaWebpackConfig(
{ path: 'wwwroot/dist', publicPath: '/dist/', https: true },
(config, env, argv) => {
config.name = 'Client';
config.entry = './Scripts/global/index.js';
addDynamicBundles(config, [
path.resolve(__dirname, 'Features'),
path.resolve(__dirname, 'UI'),
]);
return config;
}
);
```
# HTTPS

@@ -70,3 +128,3 @@

# Customization/Examples
# Examples

@@ -128,5 +186,27 @@ ## GlobbedEntriesPlugin

# Upgrade
## Upgrade from v1.3
In v1.4 the default values for `optimization.splitChunks.chunks` & `optimization.runtimeChunk` has been updated to work better with async modules, if these new settings don't work for your project you can change them back to how they were in v1.3
```javascript
const epinovaWebpackConfig = require('@epinova/webpack');
const config = epinovaWebpackConfig({}, (config) => {
...
config.optimization.splitChunks.chunks = 'initial';
config.optimization.runtimeChunk = false;
...
return config;
});
module.exports = config;
```
## Upgrade from v1.1
### Update Epinova.Webpack nuget
This update changes the format of the `manifest.json` file that the [Epinova.Webpack](https://dev.azure.com/epinova/Epinova%20-%20Modules/_git/Epinova.Webpack) nuget reads to output correct link and script tags to your CSS and script files.

@@ -137,8 +217,11 @@

### Node version 12+ is now required
It is worth noting that @epinova/webpack v1.3.0+ requires Node 12 or newer so you will need to update your system and potentially any build agents to use Node 12+. (It is recommended to switch to the current LTS version, which is currently Node 14)
### Babel
You will most likely get errors like `Module not found: Error: Can't resolve 'core-js/modules/es6.array.filter.js'` when updating from older versions, to fix this we need to update the babel configuration.
In the package.json file change this section
```json

@@ -156,3 +239,5 @@ "babel": {

```
to
```json

@@ -159,0 +244,0 @@ "babel": {