How to use mini-program-webpack-loader - 3 common examples

To help you get started, we’ve selected a few mini-program-webpack-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github youzan / weapp-plugin-demo / build / webpack.config.base.js View on Github external
const webpack = require('webpack');
const MiniPlugin = require('mini-program-webpack-loader').plugin;
const baseResolve = require('./webpack.config.base.resolve');
const baseLoaders = require('./webpack.config.base.loaders');

module.exports = {
  mode: 'development',
  target: 'node',
  devtool: false,
  watchOptions: {
    ignored: /node_modules/,
    poll: 1000
  },
  resolve: baseResolve,
  module: { rules: baseLoaders },
  optimization: {
    minimize: true,
    // 始终开启压缩,以保证在开发模式可以预览
github mojisrc / wechat-mini-shop / build / webpack.config.mini.js View on Github external
const path = require('path');
const merge = require('webpack-merge');
const MiniProgramPlugin = require('mini-program-webpack-loader').plugin;
const CopyWebpackPlugin = require('copy-webpack-plugin');
const resolve = (file) => path.resolve(__dirname, '../', file);
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');

global.context = resolve('src')

const baseConfig = require('./webpack.config.base');

module.exports = merge(baseConfig, {
  context: global.context,
  entry: resolve('src/app.json'),
  output: {
    path: resolve('dist')
  },
  plugins: [
    new MiniProgramPlugin({
github mojisrc / wechat-mini-shop / build / webpack.config.plugin.js View on Github external
const path = require('path');
const merge = require('webpack-merge');
const MiniProgramPlugin = require('mini-program-webpack-loader').plugin;
const CopyWebpackPlugin = require('copy-webpack-plugin');

const resolve = (file) => path.resolve(__dirname, '../', file);
global.context = resolve('src/plugin');

const baseConfig = require('./webpack.config.base');

module.exports = [merge(baseConfig, {
  context: global.context,
  entry: resolve('src/plugin/plugin.json'),
  output: {
    path: resolve('dist/plugin')
  },
  plugins: [
    new MiniProgramPlugin({
      forPlugin: true

mini-program-webpack-loader

mini-program webpack loader

ISC
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis

Popular mini-program-webpack-loader functions