Skip to content

Commit

Permalink
fix pipeline publish-npm node ver
Browse files Browse the repository at this point in the history
  • Loading branch information
paullobofynd committed Oct 4, 2024
1 parent f665a54 commit e3f8380
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 120 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
node-version: [16.0.0]

steps:
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(Pipeline.Workspace)/.npm
cacheHitVar: CACHE_RESTORED

- name: Checkout Repository
uses: actions/checkout@v2
with:
Expand All @@ -42,8 +50,8 @@ jobs:

- name: Install Dependencies
run: npm i
- name: Update Dependencies
run: npm install --legacy-peer-deps
# - name: Update Dependencies
# run: npm install --legacy-peer-deps

- name: List Files
run: ls -R
Expand Down
129 changes: 11 additions & 118 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,118 +1,11 @@
// const merge = require('webpack-merge');
// const path = require('path');
const CompressionPlugin = require('compression-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');


// var config = {
// mode: 'production',
// output: {
// path: path.resolve(__dirname + '/dist/'),
// },
// optimization: {
// },
// plugins: [
// new CompressionPlugin({
// test: /\.js$|\.css$|\.html$/,
// algorithm: 'gzip',
// })
// ],
// module: {
// rules: [
// {
// test: /\.js$/,
// loader: 'babel-loader',
// include: __dirname,
// exclude: /node_modules/
// },
// {
// test: /\.vue$/,
// loader: 'vue-loader'
// },
// {
// test: /\.css$/,
// loader: 'css-loader'
// }
// ]
// }
// }

// module.exports = [
// merge(config, {
// entry: path.resolve(__dirname + '/src/entry-lib.js'),
// output: {
// filename: 'nitrozen.umd.min.js',
// libraryTarget: 'window',
// library: 'nitrozen',
// }
// }),
// merge(config, {
// entry: path.resolve(__dirname + '/src/entry-lib.js'),
// output: {
// filename: 'nitrozen.umd.js',
// libraryTarget: 'umd',
// library: 'nitrozen',
// umdNamedDefine: true
// }
// })
// ]

// module.exports= {
// configureWebpack: config => {

// }
// }

// module.exports = {
// publicPath: '',
// // disable hashes in filenames
// filenameHashing: false,
// // delete HTML related webpack plugins
// // chainWebpack: config => {
// // config.plugins.delete('html')
// // config.plugins.delete('preload')
// // config.plugins.delete('prefetch')
// // }
// }

var config = {
plugins: [
new CompressionPlugin({
test: /\.js$|\.css$|\.html$/,
algorithm: 'gzip',
})
],
rules: [{
test: /\.(jpg|jpeg|gif|png)$/,
loader: 'file-loader',
query: {
name: 'assets/[name].[ext]',
publicPath: '/'
}
}]
}

// module.exports = {
// configureWebpack : {
// plugins: [
// new CompressionPlugin({
// test: /\.js$|\.html$/,
// algorithm: 'gzip',
// }),
// new MiniCssExtractPlugin({
// test: /\.css$/i,
// use: [MiniCssExtractPlugin.loader, 'css-loader'],
// })
// ]},
// chainWebpack: config => {
// config.module
// .rule('assets')
// .test(/\.(jpg|jpeg|gif|png)$/)
// .use('file-loader')
// .loader('file-loader')
// .options({
// name: 'assets/[name].[ext]',
// })
// .end()
// }
// };
const path = require('path');

module.exports = {
configureWebpack: {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
}
}
};

0 comments on commit e3f8380

Please sign in to comment.