Browse Source

rollup: polish configs

pull/981/head
Vitaly Puzrin 1 year ago
parent
commit
92f21506b8
  1. 5
      package.json
  2. 2
      support/demo_template/rollup.config.mjs
  3. 6
      support/rollup.config.mjs

5
package.json

@ -11,12 +11,12 @@
],
"repository": "markdown-it/markdown-it",
"license": "MIT",
"main": "dist/markdown-it.cjs.js",
"main": "dist/index.cjs.js",
"module": "index.mjs",
"exports": {
".": {
"import": "./index.mjs",
"require": "./dist/markdown-it.cjs.js"
"require": "./dist/index.cjs.js"
},
"./*": {
"require": "./*",
@ -55,7 +55,6 @@
"devDependencies": {
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"ansi": "^0.3.0",

2
support/demo_template/rollup.config.mjs

@ -1,12 +1,10 @@
import nodeResolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import terser from '@rollup/plugin-terser'
const plugins = [
nodeResolve({ preferBuiltins: true }),
commonjs(),
json({ namedExports: false }),
// Here terser is used only to force ascii output
terser({
mangle: false,

6
support/rollup.config.mjs

@ -9,7 +9,7 @@ const config_umd_full = {
input: 'index.mjs',
output: [
{
file: 'dist/markdown-it.js',
file: `dist/${pkg.name}.js`,
format: 'umd',
name: 'markdownit',
plugins: [
@ -22,7 +22,7 @@ const config_umd_full = {
]
},
{
file: 'dist/markdown-it.min.js',
file: `dist/${pkg.name}.min.js`,
format: 'umd',
name: 'markdownit',
plugins: [
@ -46,7 +46,7 @@ const config_umd_full = {
const config_cjs_no_deps = {
input: 'index.mjs',
output: {
file: 'dist/markdown-it.cjs.js',
file: 'dist/index.cjs.js',
format: 'cjs'
},
external: Object.keys(pkg.dependencies),

Loading…
Cancel
Save