"use strict";var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");_Object$defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var paths = _interopRequireWildcard(require("../lib/paths.js"));
var _constanst = require("../lib/constanst.js");function _getRequireWildcardCache(e) {if ("function" != typeof _WeakMap) return null;var r = new _WeakMap(),t = new _WeakMap();return (_getRequireWildcardCache = function (e) {return e ? t : r;})(e);}function _interopRequireWildcard(e, r) {if (!r && e && e.__esModule) return e;if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };var t = _getRequireWildcardCache(r);if (t && t.has(e)) return t.get(e);var n = { __proto__: null },a = _Object$defineProperty && _Object$getOwnPropertyDescriptor;for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null;i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u];}return n.default = e, t && t.set(e, n), n;}var _default = exports.default =

{
  mode: 'none',
  // target: 'node',
  context: paths.PROJECT_PATH,
  output: {
    filename: '[name].js',
    path: paths.BUILD,
    globalObject: 'this',
    publicPath: ''
  },
  // amd: false,
  module: {
    rules: [
    {
      test: /\.js$/,
      include: [paths.SRC],
      exclude: (filePath) => {
        return (
          filePath.includes('node_modules') || filePath.includes('@babel'));

      }
    },
    {
      test: /^(?!.*\.(js|json)$).*$/i,
      use: [
      {
        loader: require.resolve('file-loader'),
        options: {
          context: paths.SRC,
          esModule: false,
          name(resourcePath, resourceQuery) {
            return '[path][name].[ext]';
          }
        }
      }]

    }],

    exprContextRecursive: true,
    unknownContextCritical: true,
    unknownContextRecursive: true,
    wrappedContextRecursive: true,
    noParse: /\.json$/
  },
  resolve: {
    extensions: _constanst.FILE_EXT,
    modules: [
    paths.SRC,
    'node_modules'],

    preferRelative: true,
    alias: { // 如果有动态导入的模块，可以使用该方法添加
      '@qgame/adapter': require.resolve('@qgame/adapter', { paths: [__dirname] })
    }
  },
  ignoreWarnings: [
  (warning) => warning.message.includes('DEP_WEBPACK_COMPILATION_ASSETS')]

};