|
@@ -6,16 +6,10 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
|
|
|
|
|
module.exports={
|
|
|
- entry:{
|
|
|
- index:"./index.js",
|
|
|
- sample:"./utils/sample.js",
|
|
|
- },
|
|
|
+ entry:"./index.js",
|
|
|
output:{
|
|
|
- filename:"[name].js",
|
|
|
- path:path.resolve(__dirname,"./dist"),
|
|
|
- assetModuleFilename:"media/[name].[ext]",
|
|
|
- publicPath: '/',
|
|
|
- clean: true
|
|
|
+ filename:"bundle.js",
|
|
|
+ path:path.resolve(__dirname,"./dist")
|
|
|
},
|
|
|
resolve: {
|
|
|
alias: {
|
|
@@ -37,76 +31,17 @@ module.exports={
|
|
|
|
|
|
{
|
|
|
test: /\.js$/,
|
|
|
- exclude: /node_modules/,
|
|
|
- use: {
|
|
|
- loader: 'babel-loader',
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- test:/\.(png|jpe?g|gif|svg)$/i,
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- type: 'asset/resource',
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- test:/\.(woff2?|eof|ttf)$/i,
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- type: 'asset/resource',
|
|
|
- generator:{
|
|
|
- filename: "./font/[name].[ext]",
|
|
|
- }
|
|
|
- },]
|
|
|
+ loader: 'babel-loader',
|
|
|
+ exclude: /node_modules/
|
|
|
+ }]
|
|
|
},
|
|
|
plugins:[
|
|
|
new VueLoaderPlugin(),
|
|
|
new CleanWebpackPlugin(),
|
|
|
new HtmlWebpackPlugin({
|
|
|
- inject:'head',
|
|
|
- title:"index page ",
|
|
|
- template:"./index.html",
|
|
|
- filename:"index.html",
|
|
|
- chunks:['index'],
|
|
|
- }),
|
|
|
- new HtmlWebpackPlugin({
|
|
|
inject:'body',
|
|
|
- title:"sample page",
|
|
|
- template:"./pages/sample.html",
|
|
|
- filename:"sample.html",
|
|
|
- chunks:['sample'],
|
|
|
- }),
|
|
|
- ],
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ title:"webpack sample ",
|
|
|
+ template:"./index.html"
|
|
|
+ })
|
|
|
+ ]
|
|
|
}
|