Skip to content

Commit

Permalink
chore(rollup): add import node_modules feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Jun 23, 2020
1 parent dfe9bea commit a4bcabf
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 1 deletion.
118 changes: 118 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"author": "zenoslin",
"license": "ISC",
"devDependencies": {
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"@rollup/plugin-replace": "^2.3.3",
"@types/jest": "^26.0.0",
"jest": "^26.0.1",
"rollup": "^2.17.1",
Expand All @@ -20,5 +23,8 @@
"ts-jest": "^26.1.0",
"tslib": "^2.0.0",
"typescript": "^3.9.5"
},
"dependencies": {
"@vue/reactivity": "^3.0.0-beta.15"
}
}
11 changes: 10 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import pkg from "./package.json";
import typescript from "rollup-plugin-typescript";
import sourceMaps from "rollup-plugin-sourcemaps";
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs'
import replace from '@rollup/plugin-replace'

export default {
input: "./src/index.ts",
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
'process.env.VUE_ENV': JSON.stringify('browser')
}),
resolve(),
commonjs(),
typescript({
exclude: "node_modules/**",
typescript: require("typescript")
}),
sourceMaps()
sourceMaps(),
],
output: [
{
Expand Down

0 comments on commit a4bcabf

Please sign in to comment.