-
-
Notifications
You must be signed in to change notification settings - Fork 668
Expand file tree
/
Copy pathpackage.json.tpl
More file actions
14 lines (14 loc) · 801 Bytes
/
package.json.tpl
File metadata and controls
14 lines (14 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<% const nodeOptions = langType === "Typescript" ? "NODE_OPTIONS='--loader ts-node/esm --no-warnings' " : ""; %>{
"version": "1.0.0",
"description": "My webpack project",
"name": "webpack-project",
"type": "module",
"scripts": {
"build": "<%- nodeOptions %>webpack --mode=production --config-node-env=production <%- langType === 'Typescript' ? ' -c ./webpack.config.ts' : '' %>",
"build:dev": "<%- nodeOptions %>webpack --mode=development <%- langType === 'Typescript' ? ' -c ./webpack.config.ts' : '' %>",
<% if (devServer) { %>
"serve": "<%- nodeOptions %>webpack serve <%- langType === 'Typescript' ? ' -c ./webpack.config.ts' : '' %>",
<% } %>
"watch": "<%- nodeOptions %>webpack --watch <%- langType === 'Typescript' ? ' -c ./webpack.config.ts' : '' %>"
}
}