Skip to content

Commit

Permalink
fix(Build): Correcting webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Nov 2, 2023
1 parent c1a91c8 commit 704a657
Show file tree
Hide file tree
Showing 48 changed files with 208 additions and 6,320 deletions.
6 changes: 4 additions & 2 deletions .config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file-loader',
options: {
name: 'assets/[name].[hash].[ext]',
name: 'assets/[name].[fullhash].[ext]',
},
},
{
Expand Down Expand Up @@ -64,7 +64,9 @@ module.exports = {
template: helpers.root('demo', 'index.html'),
}),

new CopyWebpackPlugin([{ from: helpers.root('demo', 'assets'), to: 'assets' }]),
new CopyWebpackPlugin({ patterns: [
{ from: helpers.root('demo', 'assets'), to: 'assets' }
]}),

new AngularCompilerPlugin({
tsConfigPath: './tsconfig.json',
Expand Down
14 changes: 7 additions & 7 deletions .config/webpack.github.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var webpackMerge = require('webpack-merge');
var commonConfig = require('./webpack.prod.js');
var helpers = require('./helpers');
const { merge } = require('webpack-merge');
const commonConfig = require('./webpack.prod.js');
const helpers = require('./helpers');

module.exports = webpackMerge(commonConfig, {
module.exports = merge(commonConfig, {
mode: 'production',
output: {
path: helpers.root('docs'),
publicPath: 'https://visjs.github.io/ngx-vis',
filename: '[name].[hash].js',
chunkFilename: '[id].[hash].chunk.js',
mode: 'production'
filename: '[name].[fullhash].js',
chunkFilename: '[id].[fullhash].chunk.js',
}
});
6 changes: 3 additions & 3 deletions .config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ module.exports = webpackMerge(commonConfig, {
output: {
path: helpers.root('dist'),
publicPath: './',
filename: '[name].[hash].js',
chunkFilename: '[id].[hash].chunk.js'
filename: '[name].[fullhash].js',
chunkFilename: '[id].[fullhash].chunk.js'
},

plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name].[hash].css",
filename: "[name].[fullhash].css",
chunkFilename: "[id].css"
}),
new webpack.DefinePlugin({
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: npm install, build and test
run: |
npm install
npm run build
npm run build:all
npm run test
deploy:
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion demo/demo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';

import { VisModule } from '../dist';
import { VisModule } from '../dist/fesm2022/ngxvis.mjs';
import { DemoComponent } from './demo.component';
import { HomeComponent } from './home/home.component';
import { VisNetworkExampleComponent } from './network/network-example.component';
Expand Down
2,461 changes: 0 additions & 2,461 deletions docs/app.0bf66760cb611397ebd2.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/app.0bf66760cb611397ebd2.js.map

This file was deleted.

69 changes: 0 additions & 69 deletions docs/assets/css/example.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/css/vis.min.css

This file was deleted.

Binary file removed docs/assets/img/network/acceptDeleteIcon.png
Binary file not shown.
Binary file removed docs/assets/img/network/addNodeIcon.png
Binary file not shown.
Binary file removed docs/assets/img/network/backIcon.png
Binary file not shown.
Binary file removed docs/assets/img/network/connectIcon.png
Binary file not shown.
Binary file removed docs/assets/img/network/cross.png
Binary file not shown.
Binary file removed docs/assets/img/network/cross2.png
Binary file not shown.
Binary file removed docs/assets/img/network/deleteIcon.png
Binary file not shown.
Binary file removed docs/assets/img/network/downArrow.png
Binary file not shown.
Binary file removed docs/assets/img/network/editIcon.png
Binary file not shown.
Binary file removed docs/assets/img/network/leftArrow.png
Diff not rendered.
Binary file removed docs/assets/img/network/minus.png
Diff not rendered.
Binary file removed docs/assets/img/network/plus.png
Diff not rendered.
Binary file removed docs/assets/img/network/rightArrow.png
Diff not rendered.
Binary file removed docs/assets/img/network/upArrow.png
Diff not rendered.
Binary file removed docs/assets/img/network/zoomExtends.png
Diff not rendered.
Binary file removed docs/assets/img/timeline/delete.png
Diff not rendered.
24 changes: 0 additions & 24 deletions docs/index.html

This file was deleted.

144 changes: 0 additions & 144 deletions docs/polyfills.0bf66760cb611397ebd2.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/polyfills.0bf66760cb611397ebd2.js.map

This file was deleted.

2,249 changes: 0 additions & 2,249 deletions docs/vendor.0bf66760cb611397ebd2.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/vendor.0bf66760cb611397ebd2.js.map

This file was deleted.

Loading

0 comments on commit 704a657

Please sign in to comment.