reacthtmlpack
Version:
Added the missing piece of treating `index.html` as entry point in webpack bundles.
27 lines (24 loc) • 505 B
JavaScript
import {
transform,
} from "babel-core";
import {
default as appendRelativePathPlugin,
} from "./appendRelativePathPlugin";
export default function transformRelativePath(
text: string, moduleExcludeList: Array<string>
): string {
return transform(text, {
babelrc: false,
presets: [
`babel-preset-syntax-from-presets`,
],
plugins: [
[
appendRelativePathPlugin, {
appendPath: `..`,
moduleExcludeList,
},
],
],
}).code;
}