Я создаю приложение, которое загружается как плагин в другие приложения.Думайте грамматически или по интеркому.
Итак, у меня будет файл javascript (загрузчик), на который клиенты должны ссылаться в своем приложении.
Этот файл, в свою очередь, добавляет iFrame и загружает мой index.html, который ссылается на мой основной пакет.
Теперь я хочу, чтобы у загрузчика не было chunkhash в имени файла, но пакет должен иметь chunkhash.
Возможно?Если да, то как?
Мой конфиг веб-пакета (извлечено из create-react-app-typescript
):
entry: {
app: [require.resolve('./polyfills'), paths.appIndexJs],
loader: "./src/integration/loader.ts"
},
output: {
// The build folder.
path: paths.appBuild,
// Generated JS file names (with nested folders).
// There will be one main bundle, and one file per asynchronous chunk.
// We don't currently advertise code splitting but Webpack supports it.
filename: '[name].[chunkhash:8].js',
chunkFilename: '[name].[chunkhash:8].chunk.js',
// We inferred the "public path" (such as / or /my-project) from homepage.
publicPath: publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: info =>
path
.relative(paths.appSrc, info.absoluteResourcePath)
.replace(/\\/g, '/'),
},