我正在写一个webpack-react-typescript工具包,我发现源映射不能直接指向源代码,它直接指向source-map,这个文件有一些webpack注入代码.但是另一台计算机同时具有域webpack-internal://src/App.tsx file和webpack://域,以及webpack-internal域中可以指向当前源代码的源映射.所以我想知道的是:
1.什么是之间的不同webpack://和webpack
2.为什么有些电脑必须webpack-internal和somecomputer都没有了吗?
我正在尝试使用3.5.5版本的webpack和2.3.5 版本的requirejs。但是似乎webpack当前无法解析requirejs.config。这是演示:
webpack配置
const webpack = require('webpack');
const config = {
entry: './statics/main.js',
output: {
filename: './statics/bundle.js',
}
}
module.exports = config;
Run Code Online (Sandbox Code Playgroud)
main.js
requirejs.config({
baseUrl: './statics',
paths: {
jquery: 'lib/jquery.min',
person: 'person'
}
});
requirejs(['jquery', 'person'], function($, Person) {
console.log($().jquery);
const boy = new Person('bob');
boy.say();
});
Run Code Online (Sandbox Code Playgroud)
bundle.js
define(function() { return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function …Run Code Online (Sandbox Code Playgroud)