Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 770 Bytes

README.md

File metadata and controls

40 lines (34 loc) · 770 Bytes

rollup-plugin-inline-import

  • import file content as string
  • support css, scss, sass file automatically convert to css string and minify powered by sass and lightingcss
  • custimized prefix、transformer
pnpm i rollup-plugin-inline-import -D
// rollup.config.js
import inline from "rollup-plugin-inline-import";
const inputOptions: RollupOptions = {
  input: "./test/test.ts",
  output: {
    file: "./test/out/test.js",
    format: "iife",
    name: "test",
  },
  plugins: [
    resolve({
      extensions: [".js", ".jsx", ".ts", ".tsx"],
    }),
    commonjs(),
    babel({
      babelHelpers: "bundled",
      extensions: [".js", ".jsx", ".ts", ".tsx"],
      exclude: "mode_modules/**",
    }),
    inline(),
  ],
};

config