Skip to content

Commit aa8a47b

Browse files
committed
fix(Build): Correcting webpack config
1 parent c1a91c8 commit aa8a47b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+20
-4969
lines changed

.config/webpack.common.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
3232
loader: 'file-loader',
3333
options: {
34-
name: 'assets/[name].[hash].[ext]',
34+
name: 'assets/[name].[fullhash].[ext]',
3535
},
3636
},
3737
{
@@ -64,7 +64,9 @@ module.exports = {
6464
template: helpers.root('demo', 'index.html'),
6565
}),
6666

67-
new CopyWebpackPlugin([{ from: helpers.root('demo', 'assets'), to: 'assets' }]),
67+
new CopyWebpackPlugin({ patterns: [
68+
{ from: helpers.root('demo', 'assets'), to: 'assets' }
69+
]}),
6870

6971
new AngularCompilerPlugin({
7072
tsConfigPath: './tsconfig.json',

.config/webpack.github.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
var webpackMerge = require('webpack-merge');
2-
var commonConfig = require('./webpack.prod.js');
3-
var helpers = require('./helpers');
1+
const { merge } = require('webpack-merge');
2+
const commonConfig = require('./webpack.prod.js');
3+
const helpers = require('./helpers');
44

5-
module.exports = webpackMerge(commonConfig, {
5+
module.exports = merge(commonConfig, {
6+
mode: 'production',
67
output: {
78
path: helpers.root('docs'),
89
publicPath: 'https://visjs.github.io/ngx-vis',
9-
filename: '[name].[hash].js',
10-
chunkFilename: '[id].[hash].chunk.js',
11-
mode: 'production'
10+
filename: '[name].[fullhash].js',
11+
chunkFilename: '[id].[fullhash].chunk.js',
1212
}
1313
});

.config/webpack.prod.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ module.exports = webpackMerge(commonConfig, {
1212
output: {
1313
path: helpers.root('dist'),
1414
publicPath: './',
15-
filename: '[name].[hash].js',
16-
chunkFilename: '[id].[hash].chunk.js'
15+
filename: '[name].[fullhash].js',
16+
chunkFilename: '[id].[fullhash].chunk.js'
1717
},
1818

1919
plugins: [
2020
new webpack.NoEmitOnErrorsPlugin(),
2121
new MiniCssExtractPlugin({
2222
// Options similar to the same options in webpackOptions.output
2323
// both options are optional
24-
filename: "[name].[hash].css",
24+
filename: "[name].[fullhash].css",
2525
chunkFilename: "[id].css"
2626
}),
2727
new webpack.DefinePlugin({

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: npm install, build and test
2424
run: |
2525
npm install
26-
npm run build
26+
npm run build:all
2727
npm run test
2828
2929
deploy:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)