Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

webpack.config.js 1.4 KiB

1234567891011121314151617181920212223242526272829303132333435
  1. const webpack = require('webpack');
  2. const path = require('path');
  3. const ExtractTextPlugin = require('extract-text-webpack-plugin');
  4. const CopyWebpackPlugin = require('copy-webpack-plugin');
  5. module.exports = {
  6. entry: {
  7. app: './src/main.js',
  8. },
  9. output: {
  10. path: path.resolve(__dirname, './dist'),
  11. publicPath: '/dist/',
  12. filename: 'lesspass.min.js'
  13. },
  14. module: {
  15. rules: [
  16. {test: /\.vue$/, loader: 'vue-loader'},
  17. {test: /\.js$/, exclude: /node_modules\/(?!copy-text-to-clipboard)/, loader: "babel-loader"},
  18. {test: /\.(png|jpg|jpeg|gif|ico)$/, loader: 'file-loader?name=[name].[ext]'},
  19. {
  20. test: /\.scss$/,
  21. loader: ExtractTextPlugin.extract({fallback: 'style-loader', use: 'css-loader!sass-loader', publicPath: ''})
  22. },
  23. {test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff'},
  24. {test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff'},
  25. {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/octet-stream'},
  26. {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'},
  27. {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=image/svg+xml'},
  28. ]
  29. },
  30. plugins: [
  31. new ExtractTextPlugin('lesspass.min.css'),
  32. new CopyWebpackPlugin([{context: './src/i18n', from: '**/*.json', to: 'i18n'}])
  33. ]
  34. };