UNPKG

@modyo/cli

Version:

Modyo Command Line Interface

81 lines (79 loc) 1.63 kB
const path = require('path') const Webpack = require('webpack') const EslintFriendlyFormatter = require('eslint-friendly-formatter') module.exports = { mode: 'development', output: { filename: '[name].build.js' }, module: { rules: [ { test: /\.(js|vue)$/, loader: 'eslint-loader', enforce: 'pre', exclude: /node_modules/, include: [path.resolve('.', 'widgets')], options: { formatter: EslintFriendlyFormatter } }, { test: /\.css$/, exclude: /node_modules/, use: [ 'vue-style-loader', 'css-loader' ] }, { test: /\.vue$/, exclude: /node_modules/, use: [ 'vue-loader' ] }, { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.(png|jpg|gif|svg)$/, loader: 'file-loader', exclude: /node_modules/, options: { name: '[name].[ext]?[hash]' } } ] }, plugins: [ new Webpack.LoaderOptionsPlugin({ test: /\.(js|vue)$/, options: { eslint: { configFile: path.resolve('.', '.eslintrc'), // this is my helper for resolving paths cache: false } } }) ], externals: { vue: 'Vue', lodash: '_', vuex: 'Vuex', axios: 'axios', jquery: 'jQuery', modyo: 'modyo' }, resolve: { alias: { vue$: 'vue/dist/vue.esm.js' }, extensions: ['*', '.js', '.vue', '.json'] }, performance: { hints: false } }