generated from jacksteamdev/chrome-extension-basic
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8606b40
commit e438ef5
Showing
2 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
semi: false | ||
tabWidth: 2 | ||
trailingComma: "all" | ||
arrowParens: "always" | ||
jsxSingleQuote: true | ||
printWidth: 80 | ||
semi: false | ||
singleQuote: true | ||
arrowParens: "always" | ||
proseWrap: "always" | ||
tabWidth: 2 | ||
trailingComma: "all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,32 @@ | ||
import resolve from 'rollup-plugin-node-resolve' | ||
import commonjs from 'rollup-plugin-commonjs' | ||
/* eslint-env node */ | ||
|
||
import resolve from '@rollup/plugin-node-resolve' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import zip from 'rollup-plugin-zip' | ||
import { emptyDir } from 'rollup-plugin-empty-dir' | ||
|
||
import { chromeExtension, simpleReloader } from 'rollup-plugin-chrome-extension' | ||
|
||
const p = process.env.NODE_ENV === 'production' | ||
|
||
export default { | ||
input: ['src/manifest.json'], | ||
output: { | ||
dir: 'dist', | ||
format: 'esm', | ||
}, | ||
// always put chromeExtension() before other plugins | ||
plugins: [chromeExtension(), simpleReloader(), resolve(), commonjs()], | ||
plugins: [ | ||
// always put chromeExtension() before other plugins | ||
chromeExtension(), | ||
// includes an automatic reloader in watch mode | ||
simpleReloader(), | ||
// resolves node modules | ||
resolve(), | ||
// converts libraries that use commonjs | ||
commonjs(), | ||
// empties the dist for each build | ||
emptyDir(), | ||
// creates a zip to upload to the Chrome Web Store :) | ||
p && zip({ dir: 'releases' }), | ||
], | ||
} |