-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f665a54
commit e3f8380
Showing
2 changed files
with
21 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
} | ||
} | ||
} | ||
}; |