diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 5308a8e2..4a474f37 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -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: @@ -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 diff --git a/vue.config.js b/vue.config.js index ec3071da..981e1598 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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() -// } -// }; \ No newline at end of file +const path = require('path'); + +module.exports = { + configureWebpack: { + resolve: { + alias: { + '@': path.resolve(__dirname, 'src') + } + } + } +}; \ No newline at end of file