UNPKG

@codercy1995/cy-cli

Version:

41 lines (40 loc) 1.09 kB
const HtmlWebpackPlugin = require('html-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const path = require('path'); const cwd = process.cwd(); module.exports = { mode: 'production', entry: path.join(cwd, 'src/main.js'), output: { path: path.resolve(cwd, 'dist'), filename: 'app.js', }, module: { rules: [ { test: /\.vue$/, loader: 'vue-loader' }, { test: /\.css$/, use: [ //MiniCssExtractPlugin.loader, 'css-loader' ] } ] }, plugins: [ new VueLoaderPlugin(), new HtmlWebpackPlugin({ template: path.join(__dirname, '../template/index.html') }) ], resolve: { //modules: [`${path.join(cwd, '../../node_modules')}`], alias: { 'vue$': 'vue/dist/vue.esm.js' }, extensions: ['*', '.js', '.vue', '.json'] } };