V
V
Vitaly2019-11-18 15:38:42
webpack
Vitaly, 2019-11-18 15:38:42

How to include node_modules in assembly?

Loaded modules do not get into the assembly - an empty function remains instead.

/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

//# sourceMappingURL=...

/***/ }),

It is not possible to get the contents of an empty object during script execution. Although it's not clear to me where the empty object comes from, although the function does not return anything - is this the default value of the module?
Here is the webpack config:
webpack.config.js
const path = require('path');
const GasPlugin = require('gas-webpack-plugin');

module.exports = {
  mode: 'development',
  entry: './src/index.ts',
  devtool: false,
  output: {
    filename: 'script.js',
    path: path.join(__dirname, 'build'),
  },
  module: {
    rules: [
      {
        test: /\.[tj]s$/,
        use: 'ts-loader',
      },
    ],
  },
  resolve: {
    extensions: [
      '.ts',
      '.js',
    ],
  },
  plugins: [
    new GasPlugin()
  ],
};

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question