Debian Codegraph @

build/rollup.config.js

raw symbols ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 import path from 'path'
2 import alias from '@rollup/plugin-alias'
3 import nodeResolve from '@rollup/plugin-node-resolve'
4 import commonjs from '@rollup/plugin-commonjs'
5 import json from '@rollup/plugin-json'
6 import nodePolyfills from 'rollup-plugin-node-polyfills'
7 import replace from '@rollup/plugin-replace'
8 import inject from '@rollup/plugin-inject'
9
10 export default {
11 input: 'autoprefixer.js',
12 output: {
13 file: '../vendor/autoprefixer.js',
14 format: 'iife',
15 name: 'autoprefixer',
16 sourcemap: 'inline'
17 },
18 plugins: [
19 // patches for browser build
20 replace({
21 "colorette.enabled": "null",
22 "existsSync(": "void(",
23 include: ["/usr/share/nodejs/postcss/lib/css-syntax-error.js", "/usr/share/nodejs/postcss/lib/previous-map.js"],
24 delimiters: ['', '']
25 }),
26 json(),
27 alias({
28 entries: [
29 { find: '@babel/register', replacement: 'nop' },
30 { find: '@babel/core', replacement: 'nop' },
31 { find: 'url', replacement: path.resolve(__dirname, 'url.js') }
32 ]
33 }),
34 commonjs({
35 transformMixedEsModules: true
36 }),
37 nodeResolve({
38 browser: true,
39 preferBuiltins: false,
40 extensions: [".mjs", ".js", ".json", ".node", ".es6"],
41 modulePaths: ['node_modules','/usr/share/nodejs']
42 }),
43 nodePolyfills({
44 include: ['node_modules/**/*.js', '/usr/share/nodejs/**/*.js']
45 }),
46 inject({
47 URL: ['whatwg-url', 'URL'],
48 TextEncoder: ['text-encoding', 'TextEncoder'],
49 TextDecoder: ['text-encoding', 'TextDecoder']
50 })
51 ]
52 }